OLD | NEW |
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> x1]); |
23 bool result = false; | 23 typedef F1<T> = List<Function> Function(Function x0); |
24 assert(result = true); | 24 typedef F2<T> = List<T> Function(int y, [int x]); |
25 return result; | 25 typedef F3<T> = Function(int y, [List<T> x]); |
26 })(); | 26 typedef F4<T> = List<T> Function<A>(core.List<core.int> x); |
27 | 27 typedef F5<T> = int Function(Function x1) Function<B extends core.int>(int x); |
28 typedef F0<T> | 28 typedef F6<T> = int Function(int x, [core.List<core.int> x1]) |
29 = int Function([List<Function> x1]); | 29 Function<B extends core.int>(int x); |
30 typedef F1<T> | 30 typedef F7<T> = Function Function(int x1, {int x}) Function<B extends core.int>( |
31 = List<Function> Function(Function x0); | 31 int x); |
32 typedef F2<T> | 32 typedef F8<T> = Function Function([core.List<core.int> x]) |
33 = List<T> Function(int y, [int x]); | 33 Function<B extends core.int>(int x); |
34 typedef F3<T> | 34 typedef F9<T> = List<Function> Function(int y, [int x]) |
35 = Function(int y, [List<T> x]); | 35 Function<B extends core.int>(int x); |
36 typedef F4<T> | 36 typedef F10<T> = List<Function> Function(int x2, [List<Function> x3]) |
37 = List<T> Function<A>(core.List<core.int> x); | 37 Function<B extends core.int>(int x); |
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>(int x); | 39 Function<B extends core.int>(int x); |
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>(int x); |
42 [core.List<core.int> x1]) Function<B extends core.int>(int x); | 42 typedef F13<T> = core.List<core.int> Function(int y, [List<T> x]) |
43 typedef F7<T> | 43 Function<B extends core.int>(int x); |
44 = Function Function(int x1, {int x}) Function<B extends core.int>(int x); | 44 typedef F14<T> = List<T> Function([Function x1]) Function<B extends core.int>( |
45 typedef F8<T> | 45 int x); |
46 = Function Function([core.List<core.int> x]) Function<B extends core.int>( | 46 typedef F15<T> = List<T> Function({core.List<core.int> x}) |
47 int x); | 47 Function<B extends core.int>(int x); |
48 typedef F9<T> | 48 typedef F16<T> = Function(int y, {int x}) Function<B extends core.int>(int x); |
49 = List<Function> Function(int y, [int x]) Function<B extends core.int>( | 49 typedef F17<T> = Function(int x1, [core.List<core.int> x]) |
50 int x); | 50 Function<B extends core.int>(int x); |
51 typedef F10<T> | 51 typedef F18<T> = void Function(int x1) Function<B extends core.int>(int x); |
52 = List<Function> Function(int x2, | 52 typedef F19<T> = void Function(int x, [List<Function> x1]) |
53 [List<Function> x3]) Function<B extends core.int>(int x); | 53 Function<B extends core.int>(int x); |
54 typedef F11<T> | 54 typedef F20<T> = void Function(int y, {List<T> x}) Function<B extends core.int>( |
55 = List<Function> Function(int x1, {List<T> x}) Function<B extends core.int>( | 55 int x); |
56 int x); | 56 typedef F21<T> = List<Function> Function<A>(List<A> x) |
57 typedef F12<T> | 57 Function<B extends core.int>(int x); |
58 = core.List<core.int> Function( | 58 typedef F22<T> = A Function<A>(int x) Function<B extends core.int>(int x); |
59 List<Function> x) Function<B extends core.int>(int x); | 59 typedef F23<T> = core.List<core.int> Function(B x) Function<B extends core.int>( |
60 typedef F13<T> | 60 int x); |
61 = core.List<core.int> Function(int y, | |
62 [List<T> x]) Function<B extends core.int>(int x); | |
63 typedef F14<T> | |
64 = List<T> Function([Function x1]) Function<B extends core.int>(int x); | |
65 typedef F15<T> | |
66 = List<T> Function({core.List<core.int> x}) Function<B extends core.int>( | |
67 int x); | |
68 typedef F16<T> | |
69 = Function(int y, {int x}) Function<B extends core.int>(int x); | |
70 typedef F17<T> | |
71 = Function(int x1, [core.List<core.int> x]) Function<B extends core.int>( | |
72 int x); | |
73 typedef F18<T> | |
74 = void Function(int x1) Function<B extends core.int>(int x); | |
75 typedef F19<T> | |
76 = void Function(int x, [List<Function> x1]) Function<B extends core.int>( | |
77 int x); | |
78 typedef F20<T> | |
79 = void Function(int y, {List<T> x}) Function<B extends core.int>(int x); | |
80 typedef F21<T> | |
81 = List<Function> Function<A>(List<A> x) Function<B extends core.int>(int x); | |
82 typedef F22<T> | |
83 = A Function<A>(int x) Function<B extends core.int>(int x); | |
84 typedef F23<T> | |
85 = core.List<core.int> Function(B x) Function<B extends core.int>(int x); | |
86 | 61 |
87 int f0([List<Function> x0]) => null; | 62 int f0([List<Function> x0]) => null; |
88 List<Function> f1(Function x0) => null; | 63 List<Function> f1(Function x0) => null; |
89 List<int> f2(int y, [int x]) => null; | 64 List<int> f2(int y, [int x]) => null; |
90 f3(int y, [List<int> x]) => null; | 65 f3(int y, [List<int> x]) => null; |
91 List<int> f4<A>(core.List<core.int> x) => null; | 66 List<int> f4<A>(core.List<core.int> x) => null; |
92 int Function(Function x0) f5<B extends core.int>(int x) => null; | 67 int Function(Function x0) f5<B extends core.int>(int x) => null; |
93 int Function(int x, [core.List<core.int> x0]) f6<B extends core.int>(int x) => | 68 int Function(int x, [core.List<core.int> x0]) f6<B extends core.int>(int x) => |
94 null; | 69 null; |
95 Function Function(int x0, {int x}) f7<B extends core.int>(int x) => null; | 70 Function Function(int x0, {int x}) f7<B extends core.int>(int x) => null; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 Function(int y, [List<T> x]) x3; | 106 Function(int y, [List<T> x]) x3; |
132 List<T> Function<A>(core.List<core.int> x) x4; | 107 List<T> Function<A>(core.List<core.int> x) x4; |
133 int Function(Function x1) Function<B extends core.int>(int x) x5; | 108 int Function(Function x1) Function<B extends core.int>(int x) x5; |
134 int Function(int x, [core.List<core.int> x1]) Function<B extends core.int>( | 109 int Function(int x, [core.List<core.int> x1]) Function<B extends core.int>( |
135 int x) x6; | 110 int x) x6; |
136 Function Function(int x1, {int x}) Function<B extends core.int>(int x) x7; | 111 Function Function(int x1, {int x}) Function<B extends core.int>(int x) x7; |
137 Function Function([core.List<core.int> x]) Function<B extends core.int>(int x) | 112 Function Function([core.List<core.int> x]) Function<B extends core.int>(int x) |
138 x8; | 113 x8; |
139 List<Function> Function(int y, [int x]) Function<B extends core.int>(int x) | 114 List<Function> Function(int y, [int x]) Function<B extends core.int>(int x) |
140 x9; | 115 x9; |
141 List<Function> Function(int x2, | 116 List<Function> Function(int x2, [List<Function> x3]) |
142 [List<Function> x3]) Function<B extends core.int>(int x) x10; | 117 Function<B extends core.int>(int x) x10; |
143 List<Function> Function(int x1, {List<T> x}) Function<B extends core.int>( | 118 List<Function> Function(int x1, {List<T> x}) Function<B extends core.int>( |
144 int x) x11; | 119 int x) x11; |
145 core.List<core.int> Function(List<Function> x) Function<B extends core.int>( | 120 core.List<core.int> Function(List<Function> x) Function<B extends core.int>( |
146 int x) x12; | 121 int x) x12; |
147 core.List<core.int> Function(int y, [List<T> x]) Function<B extends core.int>( | 122 core.List<core.int> Function(int y, [List<T> x]) Function<B extends core.int>( |
148 int x) x13; | 123 int x) x13; |
149 List<T> Function([Function x1]) Function<B extends core.int>(int x) x14; | 124 List<T> Function([Function x1]) Function<B extends core.int>(int x) x14; |
150 List<T> Function({core.List<core.int> x}) Function<B extends core.int>(int x) | 125 List<T> Function({core.List<core.int> x}) Function<B extends core.int>(int x) |
151 x15; | 126 x15; |
152 Function(int y, {int x}) Function<B extends core.int>(int x) x16; | 127 Function(int y, {int x}) Function<B extends core.int>(int x) x16; |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 x2 = confuse(m2); | 273 x2 = confuse(m2); |
299 l2 = confuse(m2); | 274 l2 = confuse(m2); |
300 if (!tIsBool) { | 275 if (!tIsBool) { |
301 Expect.isTrue(f2 is F2<int>); | 276 Expect.isTrue(f2 is F2<int>); |
302 Expect.isFalse(f2 is F2<bool>); | 277 Expect.isFalse(f2 is F2<bool>); |
303 Expect.isTrue(confuse(f2) is F2<int>); | 278 Expect.isTrue(confuse(f2) is F2<int>); |
304 Expect.isFalse(confuse(f2) is F2<bool>); | 279 Expect.isFalse(confuse(f2) is F2<bool>); |
305 Expect.equals(tIsDynamic, m2 is F2<bool>); | 280 Expect.equals(tIsDynamic, m2 is F2<bool>); |
306 Expect.equals(tIsDynamic, confuse(m2) is F2<bool>); | 281 Expect.equals(tIsDynamic, confuse(m2) is F2<bool>); |
307 } else { | 282 } else { |
308 if (inCheckedMode) { | 283 if (typeAssertionsEnabled) { |
309 Expect.throws(() { | 284 Expect.throws(() { |
310 x2 = (f2 as dynamic); | 285 x2 = (f2 as dynamic); |
311 }); | 286 }); |
312 Expect.throws(() { | 287 Expect.throws(() { |
313 x2 = confuse(f2); | 288 x2 = confuse(f2); |
314 }); | 289 }); |
315 List<T> Function(int y, [int x]) l2; | 290 List<T> Function(int y, [int x]) l2; |
316 Expect.throws(() { | 291 Expect.throws(() { |
317 l2 = (f2 as dynamic); | 292 l2 = (f2 as dynamic); |
318 }); | 293 }); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 x3 = confuse(m3); | 325 x3 = confuse(m3); |
351 l3 = confuse(m3); | 326 l3 = confuse(m3); |
352 if (!tIsBool) { | 327 if (!tIsBool) { |
353 Expect.isTrue(f3 is F3<int>); | 328 Expect.isTrue(f3 is F3<int>); |
354 Expect.isFalse(f3 is F3<bool>); | 329 Expect.isFalse(f3 is F3<bool>); |
355 Expect.isTrue(confuse(f3) is F3<int>); | 330 Expect.isTrue(confuse(f3) is F3<int>); |
356 Expect.isFalse(confuse(f3) is F3<bool>); | 331 Expect.isFalse(confuse(f3) is F3<bool>); |
357 Expect.equals(tIsDynamic, m3 is F3<bool>); | 332 Expect.equals(tIsDynamic, m3 is F3<bool>); |
358 Expect.equals(tIsDynamic, confuse(m3) is F3<bool>); | 333 Expect.equals(tIsDynamic, confuse(m3) is F3<bool>); |
359 } else { | 334 } else { |
360 if (inCheckedMode) { | 335 if (typeAssertionsEnabled) { |
361 Expect.throws(() { | 336 Expect.throws(() { |
362 x3 = (f3 as dynamic); | 337 x3 = (f3 as dynamic); |
363 }); | 338 }); |
364 Expect.throws(() { | 339 Expect.throws(() { |
365 x3 = confuse(f3); | 340 x3 = confuse(f3); |
366 }); | 341 }); |
367 Function(int y, [List<T> x]) l3; | 342 Function(int y, [List<T> x]) l3; |
368 Expect.throws(() { | 343 Expect.throws(() { |
369 l3 = (f3 as dynamic); | 344 l3 = (f3 as dynamic); |
370 }); | 345 }); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 x4 = confuse(m4); | 377 x4 = confuse(m4); |
403 l4 = confuse(m4); | 378 l4 = confuse(m4); |
404 if (!tIsBool) { | 379 if (!tIsBool) { |
405 Expect.isTrue(f4 is F4<int>); | 380 Expect.isTrue(f4 is F4<int>); |
406 Expect.isFalse(f4 is F4<bool>); | 381 Expect.isFalse(f4 is F4<bool>); |
407 Expect.isTrue(confuse(f4) is F4<int>); | 382 Expect.isTrue(confuse(f4) is F4<int>); |
408 Expect.isFalse(confuse(f4) is F4<bool>); | 383 Expect.isFalse(confuse(f4) is F4<bool>); |
409 Expect.equals(tIsDynamic, m4 is F4<bool>); | 384 Expect.equals(tIsDynamic, m4 is F4<bool>); |
410 Expect.equals(tIsDynamic, confuse(m4) is F4<bool>); | 385 Expect.equals(tIsDynamic, confuse(m4) is F4<bool>); |
411 } else { | 386 } else { |
412 if (inCheckedMode) { | 387 if (typeAssertionsEnabled) { |
413 Expect.throws(() { | 388 Expect.throws(() { |
414 x4 = (f4 as dynamic); | 389 x4 = (f4 as dynamic); |
415 }); | 390 }); |
416 Expect.throws(() { | 391 Expect.throws(() { |
417 x4 = confuse(f4); | 392 x4 = confuse(f4); |
418 }); | 393 }); |
419 List<T> Function<A>(core.List<core.int> x) l4; | 394 List<T> Function<A>(core.List<core.int> x) l4; |
420 Expect.throws(() { | 395 Expect.throws(() { |
421 l4 = (f4 as dynamic); | 396 l4 = (f4 as dynamic); |
422 }); | 397 }); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 int x) l6; | 440 int x) l6; |
466 // The static function f6 sets `T` to `int`. | 441 // The static function f6 sets `T` to `int`. |
467 if (!tIsBool) { | 442 if (!tIsBool) { |
468 x6 = f6 as dynamic; | 443 x6 = f6 as dynamic; |
469 l6 = f6 as dynamic; | 444 l6 = f6 as dynamic; |
470 x6 = confuse(f6); | 445 x6 = confuse(f6); |
471 l6 = confuse(f6); | 446 l6 = confuse(f6); |
472 } | 447 } |
473 | 448 |
474 Expect.isTrue(m6 is F6); | 449 Expect.isTrue(m6 is F6); |
475 Expect.isTrue(m6 is int Function(int x, | 450 Expect.isTrue(m6 is int Function(int x, [core.List<core.int> x1]) |
476 [core.List<core.int> x1]) Function<B extends core.int>(int x)); | 451 Function<B extends core.int>(int x)); |
477 Expect.isTrue(confuse(m6) is F6); | 452 Expect.isTrue(confuse(m6) is F6); |
478 // In checked mode, verifies the type. | 453 // In checked mode, verifies the type. |
479 x6 = m6; | 454 x6 = m6; |
480 l6 = m6; | 455 l6 = m6; |
481 x6 = confuse(m6); | 456 x6 = confuse(m6); |
482 l6 = confuse(m6); | 457 l6 = confuse(m6); |
483 } | 458 } |
484 | 459 |
485 /// Function Function(int x1, {int x}) Function<B extends core.int>(int x) | 460 /// Function Function(int x1, {int x}) Function<B extends core.int>(int x) |
486 void testF7() { | 461 void testF7() { |
487 Expect.isTrue(f7 is F7); | 462 Expect.isTrue(f7 is F7); |
488 Expect.isTrue(confuse(f7) is F7); | 463 Expect.isTrue(confuse(f7) is F7); |
489 // In checked mode, verifies the type. | 464 // In checked mode, verifies the type. |
490 Function Function(int x1, {int x}) Function<B extends core.int>(int x) l7; | 465 Function Function(int x1, {int x}) Function<B extends core.int>(int x) l7; |
491 // The static function f7 sets `T` to `int`. | 466 // The static function f7 sets `T` to `int`. |
492 if (!tIsBool) { | 467 if (!tIsBool) { |
493 x7 = f7 as dynamic; | 468 x7 = f7 as dynamic; |
494 l7 = f7 as dynamic; | 469 l7 = f7 as dynamic; |
495 x7 = confuse(f7); | 470 x7 = confuse(f7); |
496 l7 = confuse(f7); | 471 l7 = confuse(f7); |
497 } | 472 } |
498 | 473 |
499 Expect.isTrue(m7 is F7); | 474 Expect.isTrue(m7 is F7); |
500 Expect.isTrue(m7 is Function Function(int x1, | 475 Expect.isTrue(m7 is Function Function(int x1, {int x}) |
501 {int x}) Function<B extends core.int>(int x)); | 476 Function<B extends core.int>(int x)); |
502 Expect.isTrue(confuse(m7) is F7); | 477 Expect.isTrue(confuse(m7) is F7); |
503 // In checked mode, verifies the type. | 478 // In checked mode, verifies the type. |
504 x7 = m7; | 479 x7 = m7; |
505 l7 = m7; | 480 l7 = m7; |
506 x7 = confuse(m7); | 481 x7 = confuse(m7); |
507 l7 = confuse(m7); | 482 l7 = confuse(m7); |
508 } | 483 } |
509 | 484 |
510 /// Function Function([core.List<core.int> x]) Function<B extends core.int>(in
t x) | 485 /// Function Function([core.List<core.int> x]) Function<B extends core.int>(in
t x) |
511 void testF8() { | 486 void testF8() { |
512 Expect.isTrue(f8 is F8); | 487 Expect.isTrue(f8 is F8); |
513 Expect.isTrue(confuse(f8) is F8); | 488 Expect.isTrue(confuse(f8) is F8); |
514 // In checked mode, verifies the type. | 489 // In checked mode, verifies the type. |
515 Function Function([core.List<core.int> x]) Function<B extends core.int>( | 490 Function Function([core.List<core.int> x]) Function<B extends core.int>( |
516 int x) l8; | 491 int x) l8; |
517 // The static function f8 sets `T` to `int`. | 492 // The static function f8 sets `T` to `int`. |
518 if (!tIsBool) { | 493 if (!tIsBool) { |
519 x8 = f8 as dynamic; | 494 x8 = f8 as dynamic; |
520 l8 = f8 as dynamic; | 495 l8 = f8 as dynamic; |
521 x8 = confuse(f8); | 496 x8 = confuse(f8); |
522 l8 = confuse(f8); | 497 l8 = confuse(f8); |
523 } | 498 } |
524 | 499 |
525 Expect.isTrue(m8 is F8); | 500 Expect.isTrue(m8 is F8); |
526 Expect.isTrue(m8 is Function Function( | 501 Expect.isTrue(m8 is Function Function([core.List<core.int> x]) |
527 [core.List<core.int> x]) Function<B extends core.int>(int x)); | 502 Function<B extends core.int>(int x)); |
528 Expect.isTrue(confuse(m8) is F8); | 503 Expect.isTrue(confuse(m8) is F8); |
529 // In checked mode, verifies the type. | 504 // In checked mode, verifies the type. |
530 x8 = m8; | 505 x8 = m8; |
531 l8 = m8; | 506 l8 = m8; |
532 x8 = confuse(m8); | 507 x8 = confuse(m8); |
533 l8 = confuse(m8); | 508 l8 = confuse(m8); |
534 } | 509 } |
535 | 510 |
536 /// List<Function> Function(int y, [int x]) Function<B extends core.int>(int x
) | 511 /// List<Function> Function(int y, [int x]) Function<B extends core.int>(int x
) |
537 void testF9() { | 512 void testF9() { |
538 Expect.isTrue(f9 is F9); | 513 Expect.isTrue(f9 is F9); |
539 Expect.isTrue(confuse(f9) is F9); | 514 Expect.isTrue(confuse(f9) is F9); |
540 // In checked mode, verifies the type. | 515 // In checked mode, verifies the type. |
541 List<Function> Function(int y, [int x]) Function<B extends core.int>(int x) | 516 List<Function> Function(int y, [int x]) Function<B extends core.int>(int x) |
542 l9; | 517 l9; |
543 // The static function f9 sets `T` to `int`. | 518 // The static function f9 sets `T` to `int`. |
544 if (!tIsBool) { | 519 if (!tIsBool) { |
545 x9 = f9 as dynamic; | 520 x9 = f9 as dynamic; |
546 l9 = f9 as dynamic; | 521 l9 = f9 as dynamic; |
547 x9 = confuse(f9); | 522 x9 = confuse(f9); |
548 l9 = confuse(f9); | 523 l9 = confuse(f9); |
549 } | 524 } |
550 | 525 |
551 Expect.isTrue(m9 is F9); | 526 Expect.isTrue(m9 is F9); |
552 Expect.isTrue(m9 is List<Function> Function(int y, | 527 Expect.isTrue(m9 is List<Function> Function(int y, [int x]) |
553 [int x]) Function<B extends core.int>(int x)); | 528 Function<B extends core.int>(int x)); |
554 Expect.isTrue(confuse(m9) is F9); | 529 Expect.isTrue(confuse(m9) is F9); |
555 // In checked mode, verifies the type. | 530 // In checked mode, verifies the type. |
556 x9 = m9; | 531 x9 = m9; |
557 l9 = m9; | 532 l9 = m9; |
558 x9 = confuse(m9); | 533 x9 = confuse(m9); |
559 l9 = confuse(m9); | 534 l9 = confuse(m9); |
560 } | 535 } |
561 | 536 |
562 /// List<Function> Function(int x2, [List<Function> x3]) Function<B extends co
re.int>(int x) | 537 /// List<Function> Function(int x2, [List<Function> x3]) Function<B extends co
re.int>(int x) |
563 void testF10() { | 538 void testF10() { |
564 Expect.isTrue(f10 is F10); | 539 Expect.isTrue(f10 is F10); |
565 Expect.isTrue(confuse(f10) is F10); | 540 Expect.isTrue(confuse(f10) is F10); |
566 // In checked mode, verifies the type. | 541 // In checked mode, verifies the type. |
567 List<Function> Function(int x2, | 542 List<Function> Function(int x2, [List<Function> x3]) |
568 [List<Function> x3]) Function<B extends core.int>(int x) l10; | 543 Function<B extends core.int>(int x) l10; |
569 // The static function f10 sets `T` to `int`. | 544 // The static function f10 sets `T` to `int`. |
570 if (!tIsBool) { | 545 if (!tIsBool) { |
571 x10 = f10 as dynamic; | 546 x10 = f10 as dynamic; |
572 l10 = f10 as dynamic; | 547 l10 = f10 as dynamic; |
573 x10 = confuse(f10); | 548 x10 = confuse(f10); |
574 l10 = confuse(f10); | 549 l10 = confuse(f10); |
575 } | 550 } |
576 | 551 |
577 Expect.isTrue(m10 is F10); | 552 Expect.isTrue(m10 is F10); |
578 Expect.isTrue(m10 is List<Function> Function(int x2, | 553 Expect.isTrue(m10 is List<Function> Function(int x2, [List<Function> x3]) |
579 [List<Function> x3]) Function<B extends core.int>(int x)); | 554 Function<B extends core.int>(int x)); |
580 Expect.isTrue(confuse(m10) is F10); | 555 Expect.isTrue(confuse(m10) is F10); |
581 // In checked mode, verifies the type. | 556 // In checked mode, verifies the type. |
582 x10 = m10; | 557 x10 = m10; |
583 l10 = m10; | 558 l10 = m10; |
584 x10 = confuse(m10); | 559 x10 = confuse(m10); |
585 l10 = confuse(m10); | 560 l10 = confuse(m10); |
586 } | 561 } |
587 | 562 |
588 /// List<Function> Function(int x1, {List<T> x}) Function<B extends core.int>(
int x) | 563 /// List<Function> Function(int x1, {List<T> x}) Function<B extends core.int>(
int x) |
589 void testF11() { | 564 void testF11() { |
590 Expect.isTrue(f11 is F11); | 565 Expect.isTrue(f11 is F11); |
591 Expect.isTrue(confuse(f11) is F11); | 566 Expect.isTrue(confuse(f11) is F11); |
592 // In checked mode, verifies the type. | 567 // In checked mode, verifies the type. |
593 List<Function> Function(int x1, {List<T> x}) Function<B extends core.int>( | 568 List<Function> Function(int x1, {List<T> x}) Function<B extends core.int>( |
594 int x) l11; | 569 int x) l11; |
595 // The static function f11 sets `T` to `int`. | 570 // The static function f11 sets `T` to `int`. |
596 if (!tIsBool) { | 571 if (!tIsBool) { |
597 x11 = f11 as dynamic; | 572 x11 = f11 as dynamic; |
598 l11 = f11 as dynamic; | 573 l11 = f11 as dynamic; |
599 x11 = confuse(f11); | 574 x11 = confuse(f11); |
600 l11 = confuse(f11); | 575 l11 = confuse(f11); |
601 } | 576 } |
602 | 577 |
603 Expect.isTrue(m11 is F11); | 578 Expect.isTrue(m11 is F11); |
604 Expect.isTrue(m11 is List<Function> Function(int x1, | 579 Expect.isTrue(m11 is List<Function> Function(int x1, {List<T> x}) |
605 {List<T> x}) Function<B extends core.int>(int x)); | 580 Function<B extends core.int>(int x)); |
606 Expect.isTrue(confuse(m11) is F11); | 581 Expect.isTrue(confuse(m11) is F11); |
607 // In checked mode, verifies the type. | 582 // In checked mode, verifies the type. |
608 x11 = m11; | 583 x11 = m11; |
609 l11 = m11; | 584 l11 = m11; |
610 x11 = confuse(m11); | 585 x11 = confuse(m11); |
611 l11 = confuse(m11); | 586 l11 = confuse(m11); |
612 if (!tIsBool) { | 587 if (!tIsBool) { |
613 Expect.isTrue(f11 is F11<int>); | 588 Expect.isTrue(f11 is F11<int>); |
614 Expect.isFalse(f11 is F11<bool>); | 589 Expect.isFalse(f11 is F11<bool>); |
615 Expect.isTrue(confuse(f11) is F11<int>); | 590 Expect.isTrue(confuse(f11) is F11<int>); |
616 Expect.isFalse(confuse(f11) is F11<bool>); | 591 Expect.isFalse(confuse(f11) is F11<bool>); |
617 Expect.equals(tIsDynamic, m11 is F11<bool>); | 592 Expect.equals(tIsDynamic, m11 is F11<bool>); |
618 Expect.equals(tIsDynamic, confuse(m11) is F11<bool>); | 593 Expect.equals(tIsDynamic, confuse(m11) is F11<bool>); |
619 } else { | 594 } else { |
620 if (inCheckedMode) { | 595 if (typeAssertionsEnabled) { |
621 Expect.throws(() { | 596 Expect.throws(() { |
622 x11 = (f11 as dynamic); | 597 x11 = (f11 as dynamic); |
623 }); | 598 }); |
624 Expect.throws(() { | 599 Expect.throws(() { |
625 x11 = confuse(f11); | 600 x11 = confuse(f11); |
626 }); | 601 }); |
627 List<Function> Function(int x1, | 602 List<Function> Function(int x1, {List<T> x}) |
628 {List<T> x}) Function<B extends core.int>(int x) l11; | 603 Function<B extends core.int>(int x) l11; |
629 Expect.throws(() { | 604 Expect.throws(() { |
630 l11 = (f11 as dynamic); | 605 l11 = (f11 as dynamic); |
631 }); | 606 }); |
632 Expect.throws(() { | 607 Expect.throws(() { |
633 l11 = confuse(f11); | 608 l11 = confuse(f11); |
634 }); | 609 }); |
635 } | 610 } |
636 List<Function> Function(int x1, {List<T> x}) Function<B extends core.int>( | 611 List<Function> Function(int x1, {List<T> x}) Function<B extends core.int>( |
637 int x) l11 = m11; | 612 int x) l11 = m11; |
638 // In checked mode, verifies the type. | 613 // In checked mode, verifies the type. |
(...skipping 11 matching lines...) Expand all Loading... |
650 int x) l12; | 625 int x) l12; |
651 // The static function f12 sets `T` to `int`. | 626 // The static function f12 sets `T` to `int`. |
652 if (!tIsBool) { | 627 if (!tIsBool) { |
653 x12 = f12 as dynamic; | 628 x12 = f12 as dynamic; |
654 l12 = f12 as dynamic; | 629 l12 = f12 as dynamic; |
655 x12 = confuse(f12); | 630 x12 = confuse(f12); |
656 l12 = confuse(f12); | 631 l12 = confuse(f12); |
657 } | 632 } |
658 | 633 |
659 Expect.isTrue(m12 is F12); | 634 Expect.isTrue(m12 is F12); |
660 Expect.isTrue(m12 is core.List<core.int> Function( | 635 Expect.isTrue(m12 is core.List<core.int> Function(List<Function> x) |
661 List<Function> x) Function<B extends core.int>(int x)); | 636 Function<B extends core.int>(int x)); |
662 Expect.isTrue(confuse(m12) is F12); | 637 Expect.isTrue(confuse(m12) is F12); |
663 // In checked mode, verifies the type. | 638 // In checked mode, verifies the type. |
664 x12 = m12; | 639 x12 = m12; |
665 l12 = m12; | 640 l12 = m12; |
666 x12 = confuse(m12); | 641 x12 = confuse(m12); |
667 l12 = confuse(m12); | 642 l12 = confuse(m12); |
668 } | 643 } |
669 | 644 |
670 /// core.List<core.int> Function(int y, [List<T> x]) Function<B extends core.i
nt>(int x) | 645 /// core.List<core.int> Function(int y, [List<T> x]) Function<B extends core.i
nt>(int x) |
671 void testF13() { | 646 void testF13() { |
672 Expect.isTrue(f13 is F13); | 647 Expect.isTrue(f13 is F13); |
673 Expect.isTrue(confuse(f13) is F13); | 648 Expect.isTrue(confuse(f13) is F13); |
674 // In checked mode, verifies the type. | 649 // In checked mode, verifies the type. |
675 core.List<core.int> Function(int y, | 650 core.List<core.int> Function(int y, [List<T> x]) |
676 [List<T> x]) Function<B extends core.int>(int x) l13; | 651 Function<B extends core.int>(int x) l13; |
677 // The static function f13 sets `T` to `int`. | 652 // The static function f13 sets `T` to `int`. |
678 if (!tIsBool) { | 653 if (!tIsBool) { |
679 x13 = f13 as dynamic; | 654 x13 = f13 as dynamic; |
680 l13 = f13 as dynamic; | 655 l13 = f13 as dynamic; |
681 x13 = confuse(f13); | 656 x13 = confuse(f13); |
682 l13 = confuse(f13); | 657 l13 = confuse(f13); |
683 } | 658 } |
684 | 659 |
685 Expect.isTrue(m13 is F13); | 660 Expect.isTrue(m13 is F13); |
686 Expect.isTrue(m13 is core.List<core.int> Function(int y, | 661 Expect.isTrue(m13 is core.List<core.int> Function(int y, [List<T> x]) |
687 [List<T> x]) Function<B extends core.int>(int x)); | 662 Function<B extends core.int>(int x)); |
688 Expect.isTrue(confuse(m13) is F13); | 663 Expect.isTrue(confuse(m13) is F13); |
689 // In checked mode, verifies the type. | 664 // In checked mode, verifies the type. |
690 x13 = m13; | 665 x13 = m13; |
691 l13 = m13; | 666 l13 = m13; |
692 x13 = confuse(m13); | 667 x13 = confuse(m13); |
693 l13 = confuse(m13); | 668 l13 = confuse(m13); |
694 if (!tIsBool) { | 669 if (!tIsBool) { |
695 Expect.isTrue(f13 is F13<int>); | 670 Expect.isTrue(f13 is F13<int>); |
696 Expect.isFalse(f13 is F13<bool>); | 671 Expect.isFalse(f13 is F13<bool>); |
697 Expect.isTrue(confuse(f13) is F13<int>); | 672 Expect.isTrue(confuse(f13) is F13<int>); |
698 Expect.isFalse(confuse(f13) is F13<bool>); | 673 Expect.isFalse(confuse(f13) is F13<bool>); |
699 Expect.equals(tIsDynamic, m13 is F13<bool>); | 674 Expect.equals(tIsDynamic, m13 is F13<bool>); |
700 Expect.equals(tIsDynamic, confuse(m13) is F13<bool>); | 675 Expect.equals(tIsDynamic, confuse(m13) is F13<bool>); |
701 } else { | 676 } else { |
702 if (inCheckedMode) { | 677 if (typeAssertionsEnabled) { |
703 Expect.throws(() { | 678 Expect.throws(() { |
704 x13 = (f13 as dynamic); | 679 x13 = (f13 as dynamic); |
705 }); | 680 }); |
706 Expect.throws(() { | 681 Expect.throws(() { |
707 x13 = confuse(f13); | 682 x13 = confuse(f13); |
708 }); | 683 }); |
709 core.List<core.int> Function(int y, | 684 core.List<core.int> Function(int y, [List<T> x]) |
710 [List<T> x]) Function<B extends core.int>(int x) l13; | 685 Function<B extends core.int>(int x) l13; |
711 Expect.throws(() { | 686 Expect.throws(() { |
712 l13 = (f13 as dynamic); | 687 l13 = (f13 as dynamic); |
713 }); | 688 }); |
714 Expect.throws(() { | 689 Expect.throws(() { |
715 l13 = confuse(f13); | 690 l13 = confuse(f13); |
716 }); | 691 }); |
717 } | 692 } |
718 core.List<core.int> Function(int y, | 693 core.List<core.int> Function(int y, [List<T> x]) |
719 [List<T> x]) Function<B extends core.int>(int x) l13 = m13; | 694 Function<B extends core.int>(int x) l13 = m13; |
720 // In checked mode, verifies the type. | 695 // In checked mode, verifies the type. |
721 x13 = m13; | 696 x13 = m13; |
722 x13 = confuse(m13); | 697 x13 = confuse(m13); |
723 } | 698 } |
724 } | 699 } |
725 | 700 |
726 /// List<T> Function([Function x1]) Function<B extends core.int>(int x) | 701 /// List<T> Function([Function x1]) Function<B extends core.int>(int x) |
727 void testF14() { | 702 void testF14() { |
728 Expect.isTrue(f14 is F14); | 703 Expect.isTrue(f14 is F14); |
729 Expect.isTrue(confuse(f14) is F14); | 704 Expect.isTrue(confuse(f14) is F14); |
730 // In checked mode, verifies the type. | 705 // In checked mode, verifies the type. |
731 List<T> Function([Function x1]) Function<B extends core.int>(int x) l14; | 706 List<T> Function([Function x1]) Function<B extends core.int>(int x) l14; |
732 // The static function f14 sets `T` to `int`. | 707 // The static function f14 sets `T` to `int`. |
733 if (!tIsBool) { | 708 if (!tIsBool) { |
734 x14 = f14 as dynamic; | 709 x14 = f14 as dynamic; |
735 l14 = f14 as dynamic; | 710 l14 = f14 as dynamic; |
736 x14 = confuse(f14); | 711 x14 = confuse(f14); |
737 l14 = confuse(f14); | 712 l14 = confuse(f14); |
738 } | 713 } |
739 | 714 |
740 Expect.isTrue(m14 is F14); | 715 Expect.isTrue(m14 is F14); |
741 Expect.isTrue(m14 is List<T> Function( | 716 Expect.isTrue(m14 is List<T> Function([Function x1]) |
742 [Function x1]) Function<B extends core.int>(int x)); | 717 Function<B extends core.int>(int x)); |
743 Expect.isTrue(confuse(m14) is F14); | 718 Expect.isTrue(confuse(m14) is F14); |
744 // In checked mode, verifies the type. | 719 // In checked mode, verifies the type. |
745 x14 = m14; | 720 x14 = m14; |
746 l14 = m14; | 721 l14 = m14; |
747 x14 = confuse(m14); | 722 x14 = confuse(m14); |
748 l14 = confuse(m14); | 723 l14 = confuse(m14); |
749 if (!tIsBool) { | 724 if (!tIsBool) { |
750 Expect.isTrue(f14 is F14<int>); | 725 Expect.isTrue(f14 is F14<int>); |
751 Expect.isFalse(f14 is F14<bool>); | 726 Expect.isFalse(f14 is F14<bool>); |
752 Expect.isTrue(confuse(f14) is F14<int>); | 727 Expect.isTrue(confuse(f14) is F14<int>); |
753 Expect.isFalse(confuse(f14) is F14<bool>); | 728 Expect.isFalse(confuse(f14) is F14<bool>); |
754 Expect.equals(tIsDynamic, m14 is F14<bool>); | 729 Expect.equals(tIsDynamic, m14 is F14<bool>); |
755 Expect.equals(tIsDynamic, confuse(m14) is F14<bool>); | 730 Expect.equals(tIsDynamic, confuse(m14) is F14<bool>); |
756 } else { | 731 } else { |
757 if (inCheckedMode) { | 732 if (typeAssertionsEnabled) { |
758 Expect.throws(() { | 733 Expect.throws(() { |
759 x14 = (f14 as dynamic); | 734 x14 = (f14 as dynamic); |
760 }); | 735 }); |
761 Expect.throws(() { | 736 Expect.throws(() { |
762 x14 = confuse(f14); | 737 x14 = confuse(f14); |
763 }); | 738 }); |
764 List<T> Function([Function x1]) Function<B extends core.int>(int x) l14; | 739 List<T> Function([Function x1]) Function<B extends core.int>(int x) l14; |
765 Expect.throws(() { | 740 Expect.throws(() { |
766 l14 = (f14 as dynamic); | 741 l14 = (f14 as dynamic); |
767 }); | 742 }); |
(...skipping 18 matching lines...) Expand all Loading... |
786 int x) l15; | 761 int x) l15; |
787 // The static function f15 sets `T` to `int`. | 762 // The static function f15 sets `T` to `int`. |
788 if (!tIsBool) { | 763 if (!tIsBool) { |
789 x15 = f15 as dynamic; | 764 x15 = f15 as dynamic; |
790 l15 = f15 as dynamic; | 765 l15 = f15 as dynamic; |
791 x15 = confuse(f15); | 766 x15 = confuse(f15); |
792 l15 = confuse(f15); | 767 l15 = confuse(f15); |
793 } | 768 } |
794 | 769 |
795 Expect.isTrue(m15 is F15); | 770 Expect.isTrue(m15 is F15); |
796 Expect.isTrue(m15 is List<T> Function( | 771 Expect.isTrue(m15 is List<T> Function({core.List<core.int> x}) |
797 {core.List<core.int> x}) Function<B extends core.int>(int x)); | 772 Function<B extends core.int>(int x)); |
798 Expect.isTrue(confuse(m15) is F15); | 773 Expect.isTrue(confuse(m15) is F15); |
799 // In checked mode, verifies the type. | 774 // In checked mode, verifies the type. |
800 x15 = m15; | 775 x15 = m15; |
801 l15 = m15; | 776 l15 = m15; |
802 x15 = confuse(m15); | 777 x15 = confuse(m15); |
803 l15 = confuse(m15); | 778 l15 = confuse(m15); |
804 if (!tIsBool) { | 779 if (!tIsBool) { |
805 Expect.isTrue(f15 is F15<int>); | 780 Expect.isTrue(f15 is F15<int>); |
806 Expect.isFalse(f15 is F15<bool>); | 781 Expect.isFalse(f15 is F15<bool>); |
807 Expect.isTrue(confuse(f15) is F15<int>); | 782 Expect.isTrue(confuse(f15) is F15<int>); |
808 Expect.isFalse(confuse(f15) is F15<bool>); | 783 Expect.isFalse(confuse(f15) is F15<bool>); |
809 Expect.equals(tIsDynamic, m15 is F15<bool>); | 784 Expect.equals(tIsDynamic, m15 is F15<bool>); |
810 Expect.equals(tIsDynamic, confuse(m15) is F15<bool>); | 785 Expect.equals(tIsDynamic, confuse(m15) is F15<bool>); |
811 } else { | 786 } else { |
812 if (inCheckedMode) { | 787 if (typeAssertionsEnabled) { |
813 Expect.throws(() { | 788 Expect.throws(() { |
814 x15 = (f15 as dynamic); | 789 x15 = (f15 as dynamic); |
815 }); | 790 }); |
816 Expect.throws(() { | 791 Expect.throws(() { |
817 x15 = confuse(f15); | 792 x15 = confuse(f15); |
818 }); | 793 }); |
819 List<T> Function({core.List<core.int> x}) Function<B extends core.int>( | 794 List<T> Function({core.List<core.int> x}) Function<B extends core.int>( |
820 int x) l15; | 795 int x) l15; |
821 Expect.throws(() { | 796 Expect.throws(() { |
822 l15 = (f15 as dynamic); | 797 l15 = (f15 as dynamic); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
867 int x) l17; | 842 int x) l17; |
868 // The static function f17 sets `T` to `int`. | 843 // The static function f17 sets `T` to `int`. |
869 if (!tIsBool) { | 844 if (!tIsBool) { |
870 x17 = f17 as dynamic; | 845 x17 = f17 as dynamic; |
871 l17 = f17 as dynamic; | 846 l17 = f17 as dynamic; |
872 x17 = confuse(f17); | 847 x17 = confuse(f17); |
873 l17 = confuse(f17); | 848 l17 = confuse(f17); |
874 } | 849 } |
875 | 850 |
876 Expect.isTrue(m17 is F17); | 851 Expect.isTrue(m17 is F17); |
877 Expect.isTrue(m17 is Function(int x1, | 852 Expect.isTrue(m17 is Function(int x1, [core.List<core.int> x]) |
878 [core.List<core.int> x]) Function<B extends core.int>(int x)); | 853 Function<B extends core.int>(int x)); |
879 Expect.isTrue(confuse(m17) is F17); | 854 Expect.isTrue(confuse(m17) is F17); |
880 // In checked mode, verifies the type. | 855 // In checked mode, verifies the type. |
881 x17 = m17; | 856 x17 = m17; |
882 l17 = m17; | 857 l17 = m17; |
883 x17 = confuse(m17); | 858 x17 = confuse(m17); |
884 l17 = confuse(m17); | 859 l17 = confuse(m17); |
885 } | 860 } |
886 | 861 |
887 /// void Function(int x1) Function<B extends core.int>(int x) | 862 /// void Function(int x1) Function<B extends core.int>(int x) |
888 void testF18() { | 863 void testF18() { |
(...skipping 29 matching lines...) Expand all Loading... |
918 int x) l19; | 893 int x) l19; |
919 // The static function f19 sets `T` to `int`. | 894 // The static function f19 sets `T` to `int`. |
920 if (!tIsBool) { | 895 if (!tIsBool) { |
921 x19 = f19 as dynamic; | 896 x19 = f19 as dynamic; |
922 l19 = f19 as dynamic; | 897 l19 = f19 as dynamic; |
923 x19 = confuse(f19); | 898 x19 = confuse(f19); |
924 l19 = confuse(f19); | 899 l19 = confuse(f19); |
925 } | 900 } |
926 | 901 |
927 Expect.isTrue(m19 is F19); | 902 Expect.isTrue(m19 is F19); |
928 Expect.isTrue(m19 is void Function(int x, | 903 Expect.isTrue(m19 is void Function(int x, [List<Function> x1]) |
929 [List<Function> x1]) Function<B extends core.int>(int x)); | 904 Function<B extends core.int>(int x)); |
930 Expect.isTrue(confuse(m19) is F19); | 905 Expect.isTrue(confuse(m19) is F19); |
931 // In checked mode, verifies the type. | 906 // In checked mode, verifies the type. |
932 x19 = m19; | 907 x19 = m19; |
933 l19 = m19; | 908 l19 = m19; |
934 x19 = confuse(m19); | 909 x19 = confuse(m19); |
935 l19 = confuse(m19); | 910 l19 = confuse(m19); |
936 } | 911 } |
937 | 912 |
938 /// void Function(int y, {List<T> x}) Function<B extends core.int>(int x) | 913 /// void Function(int y, {List<T> x}) Function<B extends core.int>(int x) |
939 void testF20() { | 914 void testF20() { |
940 Expect.isTrue(f20 is F20); | 915 Expect.isTrue(f20 is F20); |
941 Expect.isTrue(confuse(f20) is F20); | 916 Expect.isTrue(confuse(f20) is F20); |
942 // In checked mode, verifies the type. | 917 // In checked mode, verifies the type. |
943 void Function(int y, {List<T> x}) Function<B extends core.int>(int x) l20; | 918 void Function(int y, {List<T> x}) Function<B extends core.int>(int x) l20; |
944 // The static function f20 sets `T` to `int`. | 919 // The static function f20 sets `T` to `int`. |
945 if (!tIsBool) { | 920 if (!tIsBool) { |
946 x20 = f20 as dynamic; | 921 x20 = f20 as dynamic; |
947 l20 = f20 as dynamic; | 922 l20 = f20 as dynamic; |
948 x20 = confuse(f20); | 923 x20 = confuse(f20); |
949 l20 = confuse(f20); | 924 l20 = confuse(f20); |
950 } | 925 } |
951 | 926 |
952 Expect.isTrue(m20 is F20); | 927 Expect.isTrue(m20 is F20); |
953 Expect.isTrue(m20 is void Function(int y, | 928 Expect.isTrue(m20 is void Function(int y, {List<T> x}) |
954 {List<T> x}) Function<B extends core.int>(int x)); | 929 Function<B extends core.int>(int x)); |
955 Expect.isTrue(confuse(m20) is F20); | 930 Expect.isTrue(confuse(m20) is F20); |
956 // In checked mode, verifies the type. | 931 // In checked mode, verifies the type. |
957 x20 = m20; | 932 x20 = m20; |
958 l20 = m20; | 933 l20 = m20; |
959 x20 = confuse(m20); | 934 x20 = confuse(m20); |
960 l20 = confuse(m20); | 935 l20 = confuse(m20); |
961 if (!tIsBool) { | 936 if (!tIsBool) { |
962 Expect.isTrue(f20 is F20<int>); | 937 Expect.isTrue(f20 is F20<int>); |
963 Expect.isFalse(f20 is F20<bool>); | 938 Expect.isFalse(f20 is F20<bool>); |
964 Expect.isTrue(confuse(f20) is F20<int>); | 939 Expect.isTrue(confuse(f20) is F20<int>); |
965 Expect.isFalse(confuse(f20) is F20<bool>); | 940 Expect.isFalse(confuse(f20) is F20<bool>); |
966 Expect.equals(tIsDynamic, m20 is F20<bool>); | 941 Expect.equals(tIsDynamic, m20 is F20<bool>); |
967 Expect.equals(tIsDynamic, confuse(m20) is F20<bool>); | 942 Expect.equals(tIsDynamic, confuse(m20) is F20<bool>); |
968 } else { | 943 } else { |
969 if (inCheckedMode) { | 944 if (typeAssertionsEnabled) { |
970 Expect.throws(() { | 945 Expect.throws(() { |
971 x20 = (f20 as dynamic); | 946 x20 = (f20 as dynamic); |
972 }); | 947 }); |
973 Expect.throws(() { | 948 Expect.throws(() { |
974 x20 = confuse(f20); | 949 x20 = confuse(f20); |
975 }); | 950 }); |
976 void Function(int y, {List<T> x}) Function<B extends core.int>(int x) | 951 void Function(int y, {List<T> x}) Function<B extends core.int>(int x) |
977 l20; | 952 l20; |
978 Expect.throws(() { | 953 Expect.throws(() { |
979 l20 = (f20 as dynamic); | 954 l20 = (f20 as dynamic); |
(...skipping 19 matching lines...) Expand all Loading... |
999 l21; | 974 l21; |
1000 // The static function f21 sets `T` to `int`. | 975 // The static function f21 sets `T` to `int`. |
1001 if (!tIsBool) { | 976 if (!tIsBool) { |
1002 x21 = f21 as dynamic; | 977 x21 = f21 as dynamic; |
1003 l21 = f21 as dynamic; | 978 l21 = f21 as dynamic; |
1004 x21 = confuse(f21); | 979 x21 = confuse(f21); |
1005 l21 = confuse(f21); | 980 l21 = confuse(f21); |
1006 } | 981 } |
1007 | 982 |
1008 Expect.isTrue(m21 is F21); | 983 Expect.isTrue(m21 is F21); |
1009 Expect.isTrue(m21 is List<Function> Function<A>( | 984 Expect.isTrue(m21 is List<Function> Function<A>(List<A> x) |
1010 List<A> x) Function<B extends core.int>(int x)); | 985 Function<B extends core.int>(int x)); |
1011 Expect.isTrue(confuse(m21) is F21); | 986 Expect.isTrue(confuse(m21) is F21); |
1012 // In checked mode, verifies the type. | 987 // In checked mode, verifies the type. |
1013 x21 = m21; | 988 x21 = m21; |
1014 l21 = m21; | 989 l21 = m21; |
1015 x21 = confuse(m21); | 990 x21 = confuse(m21); |
1016 l21 = confuse(m21); | 991 l21 = confuse(m21); |
1017 } | 992 } |
1018 | 993 |
1019 /// A Function<A>(int x) Function<B extends core.int>(int x) | 994 /// A Function<A>(int x) Function<B extends core.int>(int x) |
1020 void testF22() { | 995 void testF22() { |
(...skipping 28 matching lines...) Expand all Loading... |
1049 core.List<core.int> Function(B x) Function<B extends core.int>(int x) l23; | 1024 core.List<core.int> Function(B x) Function<B extends core.int>(int x) l23; |
1050 // The static function f23 sets `T` to `int`. | 1025 // The static function f23 sets `T` to `int`. |
1051 if (!tIsBool) { | 1026 if (!tIsBool) { |
1052 x23 = f23 as dynamic; | 1027 x23 = f23 as dynamic; |
1053 l23 = f23 as dynamic; | 1028 l23 = f23 as dynamic; |
1054 x23 = confuse(f23); | 1029 x23 = confuse(f23); |
1055 l23 = confuse(f23); | 1030 l23 = confuse(f23); |
1056 } | 1031 } |
1057 | 1032 |
1058 Expect.isTrue(m23 is F23); | 1033 Expect.isTrue(m23 is F23); |
1059 Expect.isTrue(m23 is core.List<core.int> Function( | 1034 Expect.isTrue(m23 is core.List<core.int> Function(B x) |
1060 B x) Function<B extends core.int>(int x)); | 1035 Function<B extends core.int>(int x)); |
1061 Expect.isTrue(confuse(m23) is F23); | 1036 Expect.isTrue(confuse(m23) is F23); |
1062 // In checked mode, verifies the type. | 1037 // In checked mode, verifies the type. |
1063 x23 = m23; | 1038 x23 = m23; |
1064 l23 = m23; | 1039 l23 = m23; |
1065 x23 = confuse(m23); | 1040 x23 = confuse(m23); |
1066 l23 = confuse(m23); | 1041 l23 = confuse(m23); |
1067 } | 1042 } |
1068 } | 1043 } |
1069 | 1044 |
1070 void main() { | 1045 void main() { |
1071 new U27().runTests(); | 1046 new U27().runTests(); |
1072 new U27<int>(tIsInt: true).runTests(); | 1047 new U27<int>(tIsInt: true).runTests(); |
1073 new U27<bool>(tIsBool: true).runTests(); | 1048 new U27<bool>(tIsBool: true).runTests(); |
1074 } | 1049 } |
OLD | NEW |