Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Side by Side Diff: tests/language/function_type/function_type26_test.dart

Issue 2879153005: Add support to dart2js for option --enable-asserts. (Closed)
Patch Set: Added !$checked to section predicate in co19 status file Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // GENERATED - DON'T EDIT. 5 // GENERATED - DON'T EDIT.
6 // GENERATED - DON'T EDIT. 6 // GENERATED - DON'T EDIT.
7 // GENERATED - DON'T EDIT. 7 // GENERATED - DON'T EDIT.
8 // GENERATED - DON'T EDIT. 8 // GENERATED - DON'T EDIT.
9 // GENERATED - DON'T EDIT. 9 // GENERATED - DON'T EDIT.
10 // GENERATED - DON'T EDIT. 10 // GENERATED - DON'T EDIT.
11 // GENERATED - DON'T EDIT. 11 // GENERATED - DON'T EDIT.
12 // GENERATED - DON'T EDIT. 12 // GENERATED - DON'T EDIT.
13 13
14 import 'dart:core'; 14 import 'dart:core';
15 import 'dart:core' as core; 15 import 'dart:core' as core;
16 import 'package:expect/expect.dart'; 16 import 'package:expect/expect.dart';
17 17
18 @NoInline() 18 @NoInline()
19 @AssumeDynamic() 19 @AssumeDynamic()
20 confuse(f) => f; 20 confuse(f) => f;
21 21
22 final bool inCheckedMode = (() { 22 typedef F0<T> = int Function(List<Function> x0);
23 bool result = false; 23 typedef F1<T> = List<Function> Function(int y, [Function x]);
24 assert(result = true); 24 typedef F2<T> = List<T> Function(int x0, [int x]);
25 return result; 25 typedef F3<T> = Function(int x0, [List<T> x]);
26 })(); 26 typedef F4<T> = List<T> Function<A>(List<Function> x);
27 27 typedef F5<T> = int Function(Function x1) Function<B extends core.int>();
28 typedef F0<T> 28 typedef F6<T> = int Function(int x, [core.List<core.int> x1])
29 = int Function(List<Function> x0); 29 Function<B extends core.int>();
30 typedef F1<T> 30 typedef F7<T> = Function Function(int x1, {int x})
31 = List<Function> Function(int y, [Function x]); 31 Function<B extends core.int>();
32 typedef F2<T> 32 typedef F8<T> = Function Function([core.List<core.int> x])
33 = List<T> Function(int x0, [int x]); 33 Function<B extends core.int>();
34 typedef F3<T> 34 typedef F9<T> = List<Function> Function(int y, [int x])
35 = Function(int x0, [List<T> x]); 35 Function<B extends core.int>();
36 typedef F4<T> 36 typedef F10<T> = List<Function> Function(int x2, [List<Function> x3])
37 = List<T> Function<A>(List<Function> x); 37 Function<B extends core.int>();
38 typedef F5<T> 38 typedef F11<T> = List<Function> Function(int x1, {List<T> x})
39 = int Function(Function x1) Function<B extends core.int>(); 39 Function<B extends core.int>();
40 typedef F6<T> 40 typedef F12<T> = core.List<core.int> Function(List<Function> x)
41 = int Function(int x, 41 Function<B extends core.int>();
42 [core.List<core.int> x1]) Function<B extends core.int>(); 42 typedef F13<T> = core.List<core.int> Function(int y, [List<T> x])
43 typedef F7<T> 43 Function<B extends core.int>();
44 = Function Function(int x1, {int x}) Function<B extends core.int>(); 44 typedef F14<T> = List<T> Function([Function x1]) Function<B extends core.int>();
45 typedef F8<T> 45 typedef F15<T> = List<T> Function({core.List<core.int> x})
46 = Function Function([core.List<core.int> x]) Function<B extends core.int>(); 46 Function<B extends core.int>();
47 typedef F9<T> 47 typedef F16<T> = Function(int y, {int x}) Function<B extends core.int>();
48 = List<Function> Function(int y, [int x]) Function<B extends core.int>(); 48 typedef F17<T> = Function(int x1, [core.List<core.int> x])
49 typedef F10<T> 49 Function<B extends core.int>();
50 = List<Function> Function(int x2, 50 typedef F18<T> = void Function(int x1) Function<B extends core.int>();
51 [List<Function> x3]) Function<B extends core.int>(); 51 typedef F19<T> = void Function(int x, [List<Function> x1])
52 typedef F11<T> 52 Function<B extends core.int>();
53 = List<Function> Function(int x1, 53 typedef F20<T> = void Function(int y, {List<T> x})
54 {List<T> x}) Function<B extends core.int>(); 54 Function<B extends core.int>();
55 typedef F12<T> 55 typedef F21<T> = List<Function> Function<A>(List<A> x)
56 = core.List<core.int> Function( 56 Function<B extends core.int>();
57 List<Function> x) Function<B extends core.int>(); 57 typedef F22<T> = A Function<A>(int x) Function<B extends core.int>();
58 typedef F13<T> 58 typedef F23<T> = core.List<core.int> Function(B x)
59 = core.List<core.int> Function(int y, 59 Function<B extends core.int>();
60 [List<T> x]) Function<B extends core.int>();
61 typedef F14<T>
62 = List<T> Function([Function x1]) Function<B extends core.int>();
63 typedef F15<T>
64 = List<T> Function({core.List<core.int> x}) Function<B extends core.int>();
65 typedef F16<T>
66 = Function(int y, {int x}) Function<B extends core.int>();
67 typedef F17<T>
68 = Function(int x1, [core.List<core.int> x]) Function<B extends core.int>();
69 typedef F18<T>
70 = void Function(int x1) Function<B extends core.int>();
71 typedef F19<T>
72 = void Function(int x, [List<Function> x1]) Function<B extends core.int>();
73 typedef F20<T>
74 = void Function(int y, {List<T> x}) Function<B extends core.int>();
75 typedef F21<T>
76 = List<Function> Function<A>(List<A> x) Function<B extends core.int>();
77 typedef F22<T>
78 = A Function<A>(int x) Function<B extends core.int>();
79 typedef F23<T>
80 = core.List<core.int> Function(B x) Function<B extends core.int>();
81 60
82 int f0(List<Function> x0) => null; 61 int f0(List<Function> x0) => null;
83 List<Function> f1(int y, [Function x]) => null; 62 List<Function> f1(int y, [Function x]) => null;
84 List<int> f2(int x0, [int x]) => null; 63 List<int> f2(int x0, [int x]) => null;
85 f3(int x0, [List<int> x]) => null; 64 f3(int x0, [List<int> x]) => null;
86 List<int> f4<A>(List<Function> x) => null; 65 List<int> f4<A>(List<Function> x) => null;
87 int Function(Function x0) f5<B extends core.int>() => null; 66 int Function(Function x0) f5<B extends core.int>() => null;
88 int Function(int x, [core.List<core.int> x0]) f6<B extends core.int>() => null; 67 int Function(int x, [core.List<core.int> x0]) f6<B extends core.int>() => null;
89 Function Function(int x0, {int x}) f7<B extends core.int>() => null; 68 Function Function(int x0, {int x}) f7<B extends core.int>() => null;
90 Function Function([core.List<core.int> x]) f8<B extends core.int>() => null; 69 Function Function([core.List<core.int> x]) f8<B extends core.int>() => null;
(...skipping 26 matching lines...) Expand all
117 List<Function> Function(int y, [Function x]) x1; 96 List<Function> Function(int y, [Function x]) x1;
118 List<T> Function(int x0, [int x]) x2; 97 List<T> Function(int x0, [int x]) x2;
119 Function(int x0, [List<T> x]) x3; 98 Function(int x0, [List<T> x]) x3;
120 List<T> Function<A>(List<Function> x) x4; 99 List<T> Function<A>(List<Function> x) x4;
121 int Function(Function x1) Function<B extends core.int>() x5; 100 int Function(Function x1) Function<B extends core.int>() x5;
122 int Function(int x, [core.List<core.int> x1]) Function<B extends core.int>() 101 int Function(int x, [core.List<core.int> x1]) Function<B extends core.int>()
123 x6; 102 x6;
124 Function Function(int x1, {int x}) Function<B extends core.int>() x7; 103 Function Function(int x1, {int x}) Function<B extends core.int>() x7;
125 Function Function([core.List<core.int> x]) Function<B extends core.int>() x8; 104 Function Function([core.List<core.int> x]) Function<B extends core.int>() x8;
126 List<Function> Function(int y, [int x]) Function<B extends core.int>() x9; 105 List<Function> Function(int y, [int x]) Function<B extends core.int>() x9;
127 List<Function> Function(int x2, 106 List<Function> Function(int x2, [List<Function> x3])
128 [List<Function> x3]) Function<B extends core.int>() x10; 107 Function<B extends core.int>() x10;
129 List<Function> Function(int x1, {List<T> x}) Function<B extends core.int>() 108 List<Function> Function(int x1, {List<T> x}) Function<B extends core.int>()
130 x11; 109 x11;
131 core.List<core.int> Function(List<Function> x) Function<B extends core.int>() 110 core.List<core.int> Function(List<Function> x) Function<B extends core.int>()
132 x12; 111 x12;
133 core.List<core.int> Function(int y, 112 core.List<core.int> Function(int y, [List<T> x])
134 [List<T> x]) Function<B extends core.int>() x13; 113 Function<B extends core.int>() x13;
135 List<T> Function([Function x1]) Function<B extends core.int>() x14; 114 List<T> Function([Function x1]) Function<B extends core.int>() x14;
136 List<T> Function({core.List<core.int> x}) Function<B extends core.int>() x15; 115 List<T> Function({core.List<core.int> x}) Function<B extends core.int>() x15;
137 Function(int y, {int x}) Function<B extends core.int>() x16; 116 Function(int y, {int x}) Function<B extends core.int>() x16;
138 Function(int x1, [core.List<core.int> x]) Function<B extends core.int>() x17; 117 Function(int x1, [core.List<core.int> x]) Function<B extends core.int>() x17;
139 void Function(int x1) Function<B extends core.int>() x18; 118 void Function(int x1) Function<B extends core.int>() x18;
140 void Function(int x, [List<Function> x1]) Function<B extends core.int>() x19; 119 void Function(int x, [List<Function> x1]) Function<B extends core.int>() x19;
141 void Function(int y, {List<T> x}) Function<B extends core.int>() x20; 120 void Function(int y, {List<T> x}) Function<B extends core.int>() x20;
142 List<Function> Function<A>(List<A> x) Function<B extends core.int>() x21; 121 List<Function> Function<A>(List<A> x) Function<B extends core.int>() x21;
143 A Function<A>(int x) Function<B extends core.int>() x22; 122 A Function<A>(int x) Function<B extends core.int>() x22;
144 core.List<core.int> Function(B x) Function<B extends core.int>() x23; 123 core.List<core.int> Function(B x) Function<B extends core.int>() x23;
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 x2 = confuse(m2); 253 x2 = confuse(m2);
275 l2 = confuse(m2); 254 l2 = confuse(m2);
276 if (!tIsBool) { 255 if (!tIsBool) {
277 Expect.isTrue(f2 is F2<int>); 256 Expect.isTrue(f2 is F2<int>);
278 Expect.isFalse(f2 is F2<bool>); 257 Expect.isFalse(f2 is F2<bool>);
279 Expect.isTrue(confuse(f2) is F2<int>); 258 Expect.isTrue(confuse(f2) is F2<int>);
280 Expect.isFalse(confuse(f2) is F2<bool>); 259 Expect.isFalse(confuse(f2) is F2<bool>);
281 Expect.equals(tIsDynamic, m2 is F2<bool>); 260 Expect.equals(tIsDynamic, m2 is F2<bool>);
282 Expect.equals(tIsDynamic, confuse(m2) is F2<bool>); 261 Expect.equals(tIsDynamic, confuse(m2) is F2<bool>);
283 } else { 262 } else {
284 if (inCheckedMode) { 263 if (typeAssertionsEnabled) {
285 Expect.throws(() { 264 Expect.throws(() {
286 x2 = (f2 as dynamic); 265 x2 = (f2 as dynamic);
287 }); 266 });
288 Expect.throws(() { 267 Expect.throws(() {
289 x2 = confuse(f2); 268 x2 = confuse(f2);
290 }); 269 });
291 List<T> Function(int x0, [int x]) l2; 270 List<T> Function(int x0, [int x]) l2;
292 Expect.throws(() { 271 Expect.throws(() {
293 l2 = (f2 as dynamic); 272 l2 = (f2 as dynamic);
294 }); 273 });
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 x3 = confuse(m3); 305 x3 = confuse(m3);
327 l3 = confuse(m3); 306 l3 = confuse(m3);
328 if (!tIsBool) { 307 if (!tIsBool) {
329 Expect.isTrue(f3 is F3<int>); 308 Expect.isTrue(f3 is F3<int>);
330 Expect.isFalse(f3 is F3<bool>); 309 Expect.isFalse(f3 is F3<bool>);
331 Expect.isTrue(confuse(f3) is F3<int>); 310 Expect.isTrue(confuse(f3) is F3<int>);
332 Expect.isFalse(confuse(f3) is F3<bool>); 311 Expect.isFalse(confuse(f3) is F3<bool>);
333 Expect.equals(tIsDynamic, m3 is F3<bool>); 312 Expect.equals(tIsDynamic, m3 is F3<bool>);
334 Expect.equals(tIsDynamic, confuse(m3) is F3<bool>); 313 Expect.equals(tIsDynamic, confuse(m3) is F3<bool>);
335 } else { 314 } else {
336 if (inCheckedMode) { 315 if (typeAssertionsEnabled) {
337 Expect.throws(() { 316 Expect.throws(() {
338 x3 = (f3 as dynamic); 317 x3 = (f3 as dynamic);
339 }); 318 });
340 Expect.throws(() { 319 Expect.throws(() {
341 x3 = confuse(f3); 320 x3 = confuse(f3);
342 }); 321 });
343 Function(int x0, [List<T> x]) l3; 322 Function(int x0, [List<T> x]) l3;
344 Expect.throws(() { 323 Expect.throws(() {
345 l3 = (f3 as dynamic); 324 l3 = (f3 as dynamic);
346 }); 325 });
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 x4 = confuse(m4); 357 x4 = confuse(m4);
379 l4 = confuse(m4); 358 l4 = confuse(m4);
380 if (!tIsBool) { 359 if (!tIsBool) {
381 Expect.isTrue(f4 is F4<int>); 360 Expect.isTrue(f4 is F4<int>);
382 Expect.isFalse(f4 is F4<bool>); 361 Expect.isFalse(f4 is F4<bool>);
383 Expect.isTrue(confuse(f4) is F4<int>); 362 Expect.isTrue(confuse(f4) is F4<int>);
384 Expect.isFalse(confuse(f4) is F4<bool>); 363 Expect.isFalse(confuse(f4) is F4<bool>);
385 Expect.equals(tIsDynamic, m4 is F4<bool>); 364 Expect.equals(tIsDynamic, m4 is F4<bool>);
386 Expect.equals(tIsDynamic, confuse(m4) is F4<bool>); 365 Expect.equals(tIsDynamic, confuse(m4) is F4<bool>);
387 } else { 366 } else {
388 if (inCheckedMode) { 367 if (typeAssertionsEnabled) {
389 Expect.throws(() { 368 Expect.throws(() {
390 x4 = (f4 as dynamic); 369 x4 = (f4 as dynamic);
391 }); 370 });
392 Expect.throws(() { 371 Expect.throws(() {
393 x4 = confuse(f4); 372 x4 = confuse(f4);
394 }); 373 });
395 List<T> Function<A>(List<Function> x) l4; 374 List<T> Function<A>(List<Function> x) l4;
396 Expect.throws(() { 375 Expect.throws(() {
397 l4 = (f4 as dynamic); 376 l4 = (f4 as dynamic);
398 }); 377 });
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 l6; 420 l6;
442 // The static function f6 sets `T` to `int`. 421 // The static function f6 sets `T` to `int`.
443 if (!tIsBool) { 422 if (!tIsBool) {
444 x6 = f6 as dynamic; 423 x6 = f6 as dynamic;
445 l6 = f6 as dynamic; 424 l6 = f6 as dynamic;
446 x6 = confuse(f6); 425 x6 = confuse(f6);
447 l6 = confuse(f6); 426 l6 = confuse(f6);
448 } 427 }
449 428
450 Expect.isTrue(m6 is F6); 429 Expect.isTrue(m6 is F6);
451 Expect.isTrue(m6 is int Function(int x, 430 Expect.isTrue(m6 is int Function(int x, [core.List<core.int> x1])
452 [core.List<core.int> x1]) Function<B extends core.int>()); 431 Function<B extends core.int>());
453 Expect.isTrue(confuse(m6) is F6); 432 Expect.isTrue(confuse(m6) is F6);
454 // In checked mode, verifies the type. 433 // In checked mode, verifies the type.
455 x6 = m6; 434 x6 = m6;
456 l6 = m6; 435 l6 = m6;
457 x6 = confuse(m6); 436 x6 = confuse(m6);
458 l6 = confuse(m6); 437 l6 = confuse(m6);
459 } 438 }
460 439
461 /// Function Function(int x1, {int x}) Function<B extends core.int>() 440 /// Function Function(int x1, {int x}) Function<B extends core.int>()
462 void testF7() { 441 void testF7() {
463 Expect.isTrue(f7 is F7); 442 Expect.isTrue(f7 is F7);
464 Expect.isTrue(confuse(f7) is F7); 443 Expect.isTrue(confuse(f7) is F7);
465 // In checked mode, verifies the type. 444 // In checked mode, verifies the type.
466 Function Function(int x1, {int x}) Function<B extends core.int>() l7; 445 Function Function(int x1, {int x}) Function<B extends core.int>() l7;
467 // The static function f7 sets `T` to `int`. 446 // The static function f7 sets `T` to `int`.
468 if (!tIsBool) { 447 if (!tIsBool) {
469 x7 = f7 as dynamic; 448 x7 = f7 as dynamic;
470 l7 = f7 as dynamic; 449 l7 = f7 as dynamic;
471 x7 = confuse(f7); 450 x7 = confuse(f7);
472 l7 = confuse(f7); 451 l7 = confuse(f7);
473 } 452 }
474 453
475 Expect.isTrue(m7 is F7); 454 Expect.isTrue(m7 is F7);
476 Expect.isTrue(m7 is Function Function(int x1, 455 Expect.isTrue(m7 is Function Function(int x1, {int x})
477 {int x}) Function<B extends core.int>()); 456 Function<B extends core.int>());
478 Expect.isTrue(confuse(m7) is F7); 457 Expect.isTrue(confuse(m7) is F7);
479 // In checked mode, verifies the type. 458 // In checked mode, verifies the type.
480 x7 = m7; 459 x7 = m7;
481 l7 = m7; 460 l7 = m7;
482 x7 = confuse(m7); 461 x7 = confuse(m7);
483 l7 = confuse(m7); 462 l7 = confuse(m7);
484 } 463 }
485 464
486 /// Function Function([core.List<core.int> x]) Function<B extends core.int>() 465 /// Function Function([core.List<core.int> x]) Function<B extends core.int>()
487 void testF8() { 466 void testF8() {
488 Expect.isTrue(f8 is F8); 467 Expect.isTrue(f8 is F8);
489 Expect.isTrue(confuse(f8) is F8); 468 Expect.isTrue(confuse(f8) is F8);
490 // In checked mode, verifies the type. 469 // In checked mode, verifies the type.
491 Function Function([core.List<core.int> x]) Function<B extends core.int>() 470 Function Function([core.List<core.int> x]) Function<B extends core.int>()
492 l8; 471 l8;
493 // The static function f8 sets `T` to `int`. 472 // The static function f8 sets `T` to `int`.
494 if (!tIsBool) { 473 if (!tIsBool) {
495 x8 = f8 as dynamic; 474 x8 = f8 as dynamic;
496 l8 = f8 as dynamic; 475 l8 = f8 as dynamic;
497 x8 = confuse(f8); 476 x8 = confuse(f8);
498 l8 = confuse(f8); 477 l8 = confuse(f8);
499 } 478 }
500 479
501 Expect.isTrue(m8 is F8); 480 Expect.isTrue(m8 is F8);
502 Expect.isTrue(m8 is Function Function( 481 Expect.isTrue(m8 is Function Function([core.List<core.int> x])
503 [core.List<core.int> x]) Function<B extends core.int>()); 482 Function<B extends core.int>());
504 Expect.isTrue(confuse(m8) is F8); 483 Expect.isTrue(confuse(m8) is F8);
505 // In checked mode, verifies the type. 484 // In checked mode, verifies the type.
506 x8 = m8; 485 x8 = m8;
507 l8 = m8; 486 l8 = m8;
508 x8 = confuse(m8); 487 x8 = confuse(m8);
509 l8 = confuse(m8); 488 l8 = confuse(m8);
510 } 489 }
511 490
512 /// List<Function> Function(int y, [int x]) Function<B extends core.int>() 491 /// List<Function> Function(int y, [int x]) Function<B extends core.int>()
513 void testF9() { 492 void testF9() {
514 Expect.isTrue(f9 is F9); 493 Expect.isTrue(f9 is F9);
515 Expect.isTrue(confuse(f9) is F9); 494 Expect.isTrue(confuse(f9) is F9);
516 // In checked mode, verifies the type. 495 // In checked mode, verifies the type.
517 List<Function> Function(int y, [int x]) Function<B extends core.int>() l9; 496 List<Function> Function(int y, [int x]) Function<B extends core.int>() l9;
518 // The static function f9 sets `T` to `int`. 497 // The static function f9 sets `T` to `int`.
519 if (!tIsBool) { 498 if (!tIsBool) {
520 x9 = f9 as dynamic; 499 x9 = f9 as dynamic;
521 l9 = f9 as dynamic; 500 l9 = f9 as dynamic;
522 x9 = confuse(f9); 501 x9 = confuse(f9);
523 l9 = confuse(f9); 502 l9 = confuse(f9);
524 } 503 }
525 504
526 Expect.isTrue(m9 is F9); 505 Expect.isTrue(m9 is F9);
527 Expect.isTrue(m9 is List<Function> Function(int y, 506 Expect.isTrue(m9 is List<Function> Function(int y, [int x])
528 [int x]) Function<B extends core.int>()); 507 Function<B extends core.int>());
529 Expect.isTrue(confuse(m9) is F9); 508 Expect.isTrue(confuse(m9) is F9);
530 // In checked mode, verifies the type. 509 // In checked mode, verifies the type.
531 x9 = m9; 510 x9 = m9;
532 l9 = m9; 511 l9 = m9;
533 x9 = confuse(m9); 512 x9 = confuse(m9);
534 l9 = confuse(m9); 513 l9 = confuse(m9);
535 } 514 }
536 515
537 /// List<Function> Function(int x2, [List<Function> x3]) Function<B extends co re.int>() 516 /// List<Function> Function(int x2, [List<Function> x3]) Function<B extends co re.int>()
538 void testF10() { 517 void testF10() {
539 Expect.isTrue(f10 is F10); 518 Expect.isTrue(f10 is F10);
540 Expect.isTrue(confuse(f10) is F10); 519 Expect.isTrue(confuse(f10) is F10);
541 // In checked mode, verifies the type. 520 // In checked mode, verifies the type.
542 List<Function> Function(int x2, 521 List<Function> Function(int x2, [List<Function> x3])
543 [List<Function> x3]) Function<B extends core.int>() l10; 522 Function<B extends core.int>() l10;
544 // The static function f10 sets `T` to `int`. 523 // The static function f10 sets `T` to `int`.
545 if (!tIsBool) { 524 if (!tIsBool) {
546 x10 = f10 as dynamic; 525 x10 = f10 as dynamic;
547 l10 = f10 as dynamic; 526 l10 = f10 as dynamic;
548 x10 = confuse(f10); 527 x10 = confuse(f10);
549 l10 = confuse(f10); 528 l10 = confuse(f10);
550 } 529 }
551 530
552 Expect.isTrue(m10 is F10); 531 Expect.isTrue(m10 is F10);
553 Expect.isTrue(m10 is List<Function> Function(int x2, 532 Expect.isTrue(m10 is List<Function> Function(int x2, [List<Function> x3])
554 [List<Function> x3]) Function<B extends core.int>()); 533 Function<B extends core.int>());
555 Expect.isTrue(confuse(m10) is F10); 534 Expect.isTrue(confuse(m10) is F10);
556 // In checked mode, verifies the type. 535 // In checked mode, verifies the type.
557 x10 = m10; 536 x10 = m10;
558 l10 = m10; 537 l10 = m10;
559 x10 = confuse(m10); 538 x10 = confuse(m10);
560 l10 = confuse(m10); 539 l10 = confuse(m10);
561 } 540 }
562 541
563 /// List<Function> Function(int x1, {List<T> x}) Function<B extends core.int>( ) 542 /// List<Function> Function(int x1, {List<T> x}) Function<B extends core.int>( )
564 void testF11() { 543 void testF11() {
565 Expect.isTrue(f11 is F11); 544 Expect.isTrue(f11 is F11);
566 Expect.isTrue(confuse(f11) is F11); 545 Expect.isTrue(confuse(f11) is F11);
567 // In checked mode, verifies the type. 546 // In checked mode, verifies the type.
568 List<Function> Function(int x1, {List<T> x}) Function<B extends core.int>() 547 List<Function> Function(int x1, {List<T> x}) Function<B extends core.int>()
569 l11; 548 l11;
570 // The static function f11 sets `T` to `int`. 549 // The static function f11 sets `T` to `int`.
571 if (!tIsBool) { 550 if (!tIsBool) {
572 x11 = f11 as dynamic; 551 x11 = f11 as dynamic;
573 l11 = f11 as dynamic; 552 l11 = f11 as dynamic;
574 x11 = confuse(f11); 553 x11 = confuse(f11);
575 l11 = confuse(f11); 554 l11 = confuse(f11);
576 } 555 }
577 556
578 Expect.isTrue(m11 is F11); 557 Expect.isTrue(m11 is F11);
579 Expect.isTrue(m11 is List<Function> Function(int x1, 558 Expect.isTrue(m11 is List<Function> Function(int x1, {List<T> x})
580 {List<T> x}) Function<B extends core.int>()); 559 Function<B extends core.int>());
581 Expect.isTrue(confuse(m11) is F11); 560 Expect.isTrue(confuse(m11) is F11);
582 // In checked mode, verifies the type. 561 // In checked mode, verifies the type.
583 x11 = m11; 562 x11 = m11;
584 l11 = m11; 563 l11 = m11;
585 x11 = confuse(m11); 564 x11 = confuse(m11);
586 l11 = confuse(m11); 565 l11 = confuse(m11);
587 if (!tIsBool) { 566 if (!tIsBool) {
588 Expect.isTrue(f11 is F11<int>); 567 Expect.isTrue(f11 is F11<int>);
589 Expect.isFalse(f11 is F11<bool>); 568 Expect.isFalse(f11 is F11<bool>);
590 Expect.isTrue(confuse(f11) is F11<int>); 569 Expect.isTrue(confuse(f11) is F11<int>);
591 Expect.isFalse(confuse(f11) is F11<bool>); 570 Expect.isFalse(confuse(f11) is F11<bool>);
592 Expect.equals(tIsDynamic, m11 is F11<bool>); 571 Expect.equals(tIsDynamic, m11 is F11<bool>);
593 Expect.equals(tIsDynamic, confuse(m11) is F11<bool>); 572 Expect.equals(tIsDynamic, confuse(m11) is F11<bool>);
594 } else { 573 } else {
595 if (inCheckedMode) { 574 if (typeAssertionsEnabled) {
596 Expect.throws(() { 575 Expect.throws(() {
597 x11 = (f11 as dynamic); 576 x11 = (f11 as dynamic);
598 }); 577 });
599 Expect.throws(() { 578 Expect.throws(() {
600 x11 = confuse(f11); 579 x11 = confuse(f11);
601 }); 580 });
602 List<Function> Function(int x1, 581 List<Function> Function(int x1, {List<T> x})
603 {List<T> x}) Function<B extends core.int>() l11; 582 Function<B extends core.int>() l11;
604 Expect.throws(() { 583 Expect.throws(() {
605 l11 = (f11 as dynamic); 584 l11 = (f11 as dynamic);
606 }); 585 });
607 Expect.throws(() { 586 Expect.throws(() {
608 l11 = confuse(f11); 587 l11 = confuse(f11);
609 }); 588 });
610 } 589 }
611 List<Function> Function(int x1, 590 List<Function> Function(int x1, {List<T> x})
612 {List<T> x}) Function<B extends core.int>() l11 = m11; 591 Function<B extends core.int>() l11 = m11;
613 // In checked mode, verifies the type. 592 // In checked mode, verifies the type.
614 x11 = m11; 593 x11 = m11;
615 x11 = confuse(m11); 594 x11 = confuse(m11);
616 } 595 }
617 } 596 }
618 597
619 /// core.List<core.int> Function(List<Function> x) Function<B extends core.int >() 598 /// core.List<core.int> Function(List<Function> x) Function<B extends core.int >()
620 void testF12() { 599 void testF12() {
621 Expect.isTrue(f12 is F12); 600 Expect.isTrue(f12 is F12);
622 Expect.isTrue(confuse(f12) is F12); 601 Expect.isTrue(confuse(f12) is F12);
623 // In checked mode, verifies the type. 602 // In checked mode, verifies the type.
624 core.List<core.int> Function( 603 core.List<core.int> Function(List<Function> x)
625 List<Function> x) Function<B extends core.int>() l12; 604 Function<B extends core.int>() l12;
626 // The static function f12 sets `T` to `int`. 605 // The static function f12 sets `T` to `int`.
627 if (!tIsBool) { 606 if (!tIsBool) {
628 x12 = f12 as dynamic; 607 x12 = f12 as dynamic;
629 l12 = f12 as dynamic; 608 l12 = f12 as dynamic;
630 x12 = confuse(f12); 609 x12 = confuse(f12);
631 l12 = confuse(f12); 610 l12 = confuse(f12);
632 } 611 }
633 612
634 Expect.isTrue(m12 is F12); 613 Expect.isTrue(m12 is F12);
635 Expect.isTrue(m12 is core.List<core.int> Function( 614 Expect.isTrue(m12 is core.List<core.int> Function(List<Function> x)
636 List<Function> x) Function<B extends core.int>()); 615 Function<B extends core.int>());
637 Expect.isTrue(confuse(m12) is F12); 616 Expect.isTrue(confuse(m12) is F12);
638 // In checked mode, verifies the type. 617 // In checked mode, verifies the type.
639 x12 = m12; 618 x12 = m12;
640 l12 = m12; 619 l12 = m12;
641 x12 = confuse(m12); 620 x12 = confuse(m12);
642 l12 = confuse(m12); 621 l12 = confuse(m12);
643 } 622 }
644 623
645 /// core.List<core.int> Function(int y, [List<T> x]) Function<B extends core.i nt>() 624 /// core.List<core.int> Function(int y, [List<T> x]) Function<B extends core.i nt>()
646 void testF13() { 625 void testF13() {
647 Expect.isTrue(f13 is F13); 626 Expect.isTrue(f13 is F13);
648 Expect.isTrue(confuse(f13) is F13); 627 Expect.isTrue(confuse(f13) is F13);
649 // In checked mode, verifies the type. 628 // In checked mode, verifies the type.
650 core.List<core.int> Function(int y, 629 core.List<core.int> Function(int y, [List<T> x])
651 [List<T> x]) Function<B extends core.int>() l13; 630 Function<B extends core.int>() l13;
652 // The static function f13 sets `T` to `int`. 631 // The static function f13 sets `T` to `int`.
653 if (!tIsBool) { 632 if (!tIsBool) {
654 x13 = f13 as dynamic; 633 x13 = f13 as dynamic;
655 l13 = f13 as dynamic; 634 l13 = f13 as dynamic;
656 x13 = confuse(f13); 635 x13 = confuse(f13);
657 l13 = confuse(f13); 636 l13 = confuse(f13);
658 } 637 }
659 638
660 Expect.isTrue(m13 is F13); 639 Expect.isTrue(m13 is F13);
661 Expect.isTrue(m13 is core.List<core.int> Function(int y, 640 Expect.isTrue(m13 is core.List<core.int> Function(int y, [List<T> x])
662 [List<T> x]) Function<B extends core.int>()); 641 Function<B extends core.int>());
663 Expect.isTrue(confuse(m13) is F13); 642 Expect.isTrue(confuse(m13) is F13);
664 // In checked mode, verifies the type. 643 // In checked mode, verifies the type.
665 x13 = m13; 644 x13 = m13;
666 l13 = m13; 645 l13 = m13;
667 x13 = confuse(m13); 646 x13 = confuse(m13);
668 l13 = confuse(m13); 647 l13 = confuse(m13);
669 if (!tIsBool) { 648 if (!tIsBool) {
670 Expect.isTrue(f13 is F13<int>); 649 Expect.isTrue(f13 is F13<int>);
671 Expect.isFalse(f13 is F13<bool>); 650 Expect.isFalse(f13 is F13<bool>);
672 Expect.isTrue(confuse(f13) is F13<int>); 651 Expect.isTrue(confuse(f13) is F13<int>);
673 Expect.isFalse(confuse(f13) is F13<bool>); 652 Expect.isFalse(confuse(f13) is F13<bool>);
674 Expect.equals(tIsDynamic, m13 is F13<bool>); 653 Expect.equals(tIsDynamic, m13 is F13<bool>);
675 Expect.equals(tIsDynamic, confuse(m13) is F13<bool>); 654 Expect.equals(tIsDynamic, confuse(m13) is F13<bool>);
676 } else { 655 } else {
677 if (inCheckedMode) { 656 if (typeAssertionsEnabled) {
678 Expect.throws(() { 657 Expect.throws(() {
679 x13 = (f13 as dynamic); 658 x13 = (f13 as dynamic);
680 }); 659 });
681 Expect.throws(() { 660 Expect.throws(() {
682 x13 = confuse(f13); 661 x13 = confuse(f13);
683 }); 662 });
684 core.List<core.int> Function(int y, 663 core.List<core.int> Function(int y, [List<T> x])
685 [List<T> x]) Function<B extends core.int>() l13; 664 Function<B extends core.int>() l13;
686 Expect.throws(() { 665 Expect.throws(() {
687 l13 = (f13 as dynamic); 666 l13 = (f13 as dynamic);
688 }); 667 });
689 Expect.throws(() { 668 Expect.throws(() {
690 l13 = confuse(f13); 669 l13 = confuse(f13);
691 }); 670 });
692 } 671 }
693 core.List<core.int> Function(int y, 672 core.List<core.int> Function(int y, [List<T> x])
694 [List<T> x]) Function<B extends core.int>() l13 = m13; 673 Function<B extends core.int>() l13 = m13;
695 // In checked mode, verifies the type. 674 // In checked mode, verifies the type.
696 x13 = m13; 675 x13 = m13;
697 x13 = confuse(m13); 676 x13 = confuse(m13);
698 } 677 }
699 } 678 }
700 679
701 /// List<T> Function([Function x1]) Function<B extends core.int>() 680 /// List<T> Function([Function x1]) Function<B extends core.int>()
702 void testF14() { 681 void testF14() {
703 Expect.isTrue(f14 is F14); 682 Expect.isTrue(f14 is F14);
704 Expect.isTrue(confuse(f14) is F14); 683 Expect.isTrue(confuse(f14) is F14);
(...skipping 17 matching lines...) Expand all
722 x14 = confuse(m14); 701 x14 = confuse(m14);
723 l14 = confuse(m14); 702 l14 = confuse(m14);
724 if (!tIsBool) { 703 if (!tIsBool) {
725 Expect.isTrue(f14 is F14<int>); 704 Expect.isTrue(f14 is F14<int>);
726 Expect.isFalse(f14 is F14<bool>); 705 Expect.isFalse(f14 is F14<bool>);
727 Expect.isTrue(confuse(f14) is F14<int>); 706 Expect.isTrue(confuse(f14) is F14<int>);
728 Expect.isFalse(confuse(f14) is F14<bool>); 707 Expect.isFalse(confuse(f14) is F14<bool>);
729 Expect.equals(tIsDynamic, m14 is F14<bool>); 708 Expect.equals(tIsDynamic, m14 is F14<bool>);
730 Expect.equals(tIsDynamic, confuse(m14) is F14<bool>); 709 Expect.equals(tIsDynamic, confuse(m14) is F14<bool>);
731 } else { 710 } else {
732 if (inCheckedMode) { 711 if (typeAssertionsEnabled) {
733 Expect.throws(() { 712 Expect.throws(() {
734 x14 = (f14 as dynamic); 713 x14 = (f14 as dynamic);
735 }); 714 });
736 Expect.throws(() { 715 Expect.throws(() {
737 x14 = confuse(f14); 716 x14 = confuse(f14);
738 }); 717 });
739 List<T> Function([Function x1]) Function<B extends core.int>() l14; 718 List<T> Function([Function x1]) Function<B extends core.int>() l14;
740 Expect.throws(() { 719 Expect.throws(() {
741 l14 = (f14 as dynamic); 720 l14 = (f14 as dynamic);
742 }); 721 });
(...skipping 17 matching lines...) Expand all
760 l15; 739 l15;
761 // The static function f15 sets `T` to `int`. 740 // The static function f15 sets `T` to `int`.
762 if (!tIsBool) { 741 if (!tIsBool) {
763 x15 = f15 as dynamic; 742 x15 = f15 as dynamic;
764 l15 = f15 as dynamic; 743 l15 = f15 as dynamic;
765 x15 = confuse(f15); 744 x15 = confuse(f15);
766 l15 = confuse(f15); 745 l15 = confuse(f15);
767 } 746 }
768 747
769 Expect.isTrue(m15 is F15); 748 Expect.isTrue(m15 is F15);
770 Expect.isTrue(m15 is List<T> Function( 749 Expect.isTrue(m15 is List<T> Function({core.List<core.int> x})
771 {core.List<core.int> x}) Function<B extends core.int>()); 750 Function<B extends core.int>());
772 Expect.isTrue(confuse(m15) is F15); 751 Expect.isTrue(confuse(m15) is F15);
773 // In checked mode, verifies the type. 752 // In checked mode, verifies the type.
774 x15 = m15; 753 x15 = m15;
775 l15 = m15; 754 l15 = m15;
776 x15 = confuse(m15); 755 x15 = confuse(m15);
777 l15 = confuse(m15); 756 l15 = confuse(m15);
778 if (!tIsBool) { 757 if (!tIsBool) {
779 Expect.isTrue(f15 is F15<int>); 758 Expect.isTrue(f15 is F15<int>);
780 Expect.isFalse(f15 is F15<bool>); 759 Expect.isFalse(f15 is F15<bool>);
781 Expect.isTrue(confuse(f15) is F15<int>); 760 Expect.isTrue(confuse(f15) is F15<int>);
782 Expect.isFalse(confuse(f15) is F15<bool>); 761 Expect.isFalse(confuse(f15) is F15<bool>);
783 Expect.equals(tIsDynamic, m15 is F15<bool>); 762 Expect.equals(tIsDynamic, m15 is F15<bool>);
784 Expect.equals(tIsDynamic, confuse(m15) is F15<bool>); 763 Expect.equals(tIsDynamic, confuse(m15) is F15<bool>);
785 } else { 764 } else {
786 if (inCheckedMode) { 765 if (typeAssertionsEnabled) {
787 Expect.throws(() { 766 Expect.throws(() {
788 x15 = (f15 as dynamic); 767 x15 = (f15 as dynamic);
789 }); 768 });
790 Expect.throws(() { 769 Expect.throws(() {
791 x15 = confuse(f15); 770 x15 = confuse(f15);
792 }); 771 });
793 List<T> Function({core.List<core.int> x}) Function<B extends core.int>() 772 List<T> Function({core.List<core.int> x}) Function<B extends core.int>()
794 l15; 773 l15;
795 Expect.throws(() { 774 Expect.throws(() {
796 l15 = (f15 as dynamic); 775 l15 = (f15 as dynamic);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
841 l17; 820 l17;
842 // The static function f17 sets `T` to `int`. 821 // The static function f17 sets `T` to `int`.
843 if (!tIsBool) { 822 if (!tIsBool) {
844 x17 = f17 as dynamic; 823 x17 = f17 as dynamic;
845 l17 = f17 as dynamic; 824 l17 = f17 as dynamic;
846 x17 = confuse(f17); 825 x17 = confuse(f17);
847 l17 = confuse(f17); 826 l17 = confuse(f17);
848 } 827 }
849 828
850 Expect.isTrue(m17 is F17); 829 Expect.isTrue(m17 is F17);
851 Expect.isTrue(m17 is Function(int x1, 830 Expect.isTrue(m17 is Function(int x1, [core.List<core.int> x])
852 [core.List<core.int> x]) Function<B extends core.int>()); 831 Function<B extends core.int>());
853 Expect.isTrue(confuse(m17) is F17); 832 Expect.isTrue(confuse(m17) is F17);
854 // In checked mode, verifies the type. 833 // In checked mode, verifies the type.
855 x17 = m17; 834 x17 = m17;
856 l17 = m17; 835 l17 = m17;
857 x17 = confuse(m17); 836 x17 = confuse(m17);
858 l17 = confuse(m17); 837 l17 = confuse(m17);
859 } 838 }
860 839
861 /// void Function(int x1) Function<B extends core.int>() 840 /// void Function(int x1) Function<B extends core.int>()
862 void testF18() { 841 void testF18() {
(...skipping 28 matching lines...) Expand all
891 l19; 870 l19;
892 // The static function f19 sets `T` to `int`. 871 // The static function f19 sets `T` to `int`.
893 if (!tIsBool) { 872 if (!tIsBool) {
894 x19 = f19 as dynamic; 873 x19 = f19 as dynamic;
895 l19 = f19 as dynamic; 874 l19 = f19 as dynamic;
896 x19 = confuse(f19); 875 x19 = confuse(f19);
897 l19 = confuse(f19); 876 l19 = confuse(f19);
898 } 877 }
899 878
900 Expect.isTrue(m19 is F19); 879 Expect.isTrue(m19 is F19);
901 Expect.isTrue(m19 is void Function(int x, 880 Expect.isTrue(m19 is void Function(int x, [List<Function> x1])
902 [List<Function> x1]) Function<B extends core.int>()); 881 Function<B extends core.int>());
903 Expect.isTrue(confuse(m19) is F19); 882 Expect.isTrue(confuse(m19) is F19);
904 // In checked mode, verifies the type. 883 // In checked mode, verifies the type.
905 x19 = m19; 884 x19 = m19;
906 l19 = m19; 885 l19 = m19;
907 x19 = confuse(m19); 886 x19 = confuse(m19);
908 l19 = confuse(m19); 887 l19 = confuse(m19);
909 } 888 }
910 889
911 /// void Function(int y, {List<T> x}) Function<B extends core.int>() 890 /// void Function(int y, {List<T> x}) Function<B extends core.int>()
912 void testF20() { 891 void testF20() {
913 Expect.isTrue(f20 is F20); 892 Expect.isTrue(f20 is F20);
914 Expect.isTrue(confuse(f20) is F20); 893 Expect.isTrue(confuse(f20) is F20);
915 // In checked mode, verifies the type. 894 // In checked mode, verifies the type.
916 void Function(int y, {List<T> x}) Function<B extends core.int>() l20; 895 void Function(int y, {List<T> x}) Function<B extends core.int>() l20;
917 // The static function f20 sets `T` to `int`. 896 // The static function f20 sets `T` to `int`.
918 if (!tIsBool) { 897 if (!tIsBool) {
919 x20 = f20 as dynamic; 898 x20 = f20 as dynamic;
920 l20 = f20 as dynamic; 899 l20 = f20 as dynamic;
921 x20 = confuse(f20); 900 x20 = confuse(f20);
922 l20 = confuse(f20); 901 l20 = confuse(f20);
923 } 902 }
924 903
925 Expect.isTrue(m20 is F20); 904 Expect.isTrue(m20 is F20);
926 Expect.isTrue(m20 is void Function(int y, 905 Expect.isTrue(m20 is void Function(int y, {List<T> x})
927 {List<T> x}) Function<B extends core.int>()); 906 Function<B extends core.int>());
928 Expect.isTrue(confuse(m20) is F20); 907 Expect.isTrue(confuse(m20) is F20);
929 // In checked mode, verifies the type. 908 // In checked mode, verifies the type.
930 x20 = m20; 909 x20 = m20;
931 l20 = m20; 910 l20 = m20;
932 x20 = confuse(m20); 911 x20 = confuse(m20);
933 l20 = confuse(m20); 912 l20 = confuse(m20);
934 if (!tIsBool) { 913 if (!tIsBool) {
935 Expect.isTrue(f20 is F20<int>); 914 Expect.isTrue(f20 is F20<int>);
936 Expect.isFalse(f20 is F20<bool>); 915 Expect.isFalse(f20 is F20<bool>);
937 Expect.isTrue(confuse(f20) is F20<int>); 916 Expect.isTrue(confuse(f20) is F20<int>);
938 Expect.isFalse(confuse(f20) is F20<bool>); 917 Expect.isFalse(confuse(f20) is F20<bool>);
939 Expect.equals(tIsDynamic, m20 is F20<bool>); 918 Expect.equals(tIsDynamic, m20 is F20<bool>);
940 Expect.equals(tIsDynamic, confuse(m20) is F20<bool>); 919 Expect.equals(tIsDynamic, confuse(m20) is F20<bool>);
941 } else { 920 } else {
942 if (inCheckedMode) { 921 if (typeAssertionsEnabled) {
943 Expect.throws(() { 922 Expect.throws(() {
944 x20 = (f20 as dynamic); 923 x20 = (f20 as dynamic);
945 }); 924 });
946 Expect.throws(() { 925 Expect.throws(() {
947 x20 = confuse(f20); 926 x20 = confuse(f20);
948 }); 927 });
949 void Function(int y, {List<T> x}) Function<B extends core.int>() l20; 928 void Function(int y, {List<T> x}) Function<B extends core.int>() l20;
950 Expect.throws(() { 929 Expect.throws(() {
951 l20 = (f20 as dynamic); 930 l20 = (f20 as dynamic);
952 }); 931 });
(...skipping 17 matching lines...) Expand all
970 List<Function> Function<A>(List<A> x) Function<B extends core.int>() l21; 949 List<Function> Function<A>(List<A> x) Function<B extends core.int>() l21;
971 // The static function f21 sets `T` to `int`. 950 // The static function f21 sets `T` to `int`.
972 if (!tIsBool) { 951 if (!tIsBool) {
973 x21 = f21 as dynamic; 952 x21 = f21 as dynamic;
974 l21 = f21 as dynamic; 953 l21 = f21 as dynamic;
975 x21 = confuse(f21); 954 x21 = confuse(f21);
976 l21 = confuse(f21); 955 l21 = confuse(f21);
977 } 956 }
978 957
979 Expect.isTrue(m21 is F21); 958 Expect.isTrue(m21 is F21);
980 Expect.isTrue(m21 is List<Function> Function<A>( 959 Expect.isTrue(m21 is List<Function> Function<A>(List<A> x)
981 List<A> x) Function<B extends core.int>()); 960 Function<B extends core.int>());
982 Expect.isTrue(confuse(m21) is F21); 961 Expect.isTrue(confuse(m21) is F21);
983 // In checked mode, verifies the type. 962 // In checked mode, verifies the type.
984 x21 = m21; 963 x21 = m21;
985 l21 = m21; 964 l21 = m21;
986 x21 = confuse(m21); 965 x21 = confuse(m21);
987 l21 = confuse(m21); 966 l21 = confuse(m21);
988 } 967 }
989 968
990 /// A Function<A>(int x) Function<B extends core.int>() 969 /// A Function<A>(int x) Function<B extends core.int>()
991 void testF22() { 970 void testF22() {
(...skipping 27 matching lines...) Expand all
1019 core.List<core.int> Function(B x) Function<B extends core.int>() l23; 998 core.List<core.int> Function(B x) Function<B extends core.int>() l23;
1020 // The static function f23 sets `T` to `int`. 999 // The static function f23 sets `T` to `int`.
1021 if (!tIsBool) { 1000 if (!tIsBool) {
1022 x23 = f23 as dynamic; 1001 x23 = f23 as dynamic;
1023 l23 = f23 as dynamic; 1002 l23 = f23 as dynamic;
1024 x23 = confuse(f23); 1003 x23 = confuse(f23);
1025 l23 = confuse(f23); 1004 l23 = confuse(f23);
1026 } 1005 }
1027 1006
1028 Expect.isTrue(m23 is F23); 1007 Expect.isTrue(m23 is F23);
1029 Expect.isTrue(m23 is core.List<core.int> Function( 1008 Expect.isTrue(m23 is core.List<core.int> Function(B x)
1030 B x) Function<B extends core.int>()); 1009 Function<B extends core.int>());
1031 Expect.isTrue(confuse(m23) is F23); 1010 Expect.isTrue(confuse(m23) is F23);
1032 // In checked mode, verifies the type. 1011 // In checked mode, verifies the type.
1033 x23 = m23; 1012 x23 = m23;
1034 l23 = m23; 1013 l23 = m23;
1035 x23 = confuse(m23); 1014 x23 = confuse(m23);
1036 l23 = confuse(m23); 1015 l23 = confuse(m23);
1037 } 1016 }
1038 } 1017 }
1039 1018
1040 void main() { 1019 void main() {
1041 new U26().runTests(); 1020 new U26().runTests();
1042 new U26<int>(tIsInt: true).runTests(); 1021 new U26<int>(tIsInt: true).runTests();
1043 new U26<bool>(tIsBool: true).runTests(); 1022 new U26<bool>(tIsBool: true).runTests();
1044 } 1023 }
OLDNEW
« no previous file with comments | « tests/language/function_type/function_type25_test.dart ('k') | tests/language/function_type/function_type27_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698