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(int y, [List<T> x]); |
23 bool result = false; | 23 typedef F1<T> = List<Function> Function(int x0, [core.List<core.int> x]); |
24 assert(result = true); | 24 typedef F2<T> = List<T> Function([List<Function> x]); |
25 return result; | 25 typedef F3<T> = void Function(Function x); |
26 })(); | 26 typedef F4<T> = A Function<A>(List<A> x); |
27 | 27 typedef F5<T> = int Function(int x1, {Function x}) Function<B extends core.int>( |
28 typedef F0<T> | 28 int x); |
29 = int Function(int y, [List<T> x]); | 29 typedef F6<T> = int Function([List<T> x]) Function<B extends core.int>(int x); |
30 typedef F1<T> | 30 typedef F7<T> = Function Function(int y, [Function x]) |
31 = List<Function> Function(int x0, [core.List<core.int> x]); | 31 Function<B extends core.int>(int x); |
32 typedef F2<T> | 32 typedef F8<T> = Function Function(int x2, [core.List<core.int> x3]) |
33 = List<T> Function([List<Function> x]); | 33 Function<B extends core.int>(int x); |
34 typedef F3<T> | 34 typedef F9<T> = List<Function> Function({int x}) Function<B extends core.int>( |
35 = void Function(Function x); | 35 int x); |
36 typedef F4<T> | 36 typedef F10<T> = List<Function> Function(core.List<core.int> x) |
37 = A Function<A>(List<A> x); | 37 Function<B extends core.int>(int x); |
38 typedef F5<T> | 38 typedef F11<T> = core.List<core.int> Function(int x1, [int x]) |
39 = int Function(int x1, {Function x}) 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> x1]) |
41 = int Function([List<T> x]) Function<B extends core.int>(int x); | 41 Function<B extends core.int>(int x); |
42 typedef F7<T> | 42 typedef F13<T> = core.List<core.int> Function({List<T> x}) |
43 = Function Function(int y, [Function x]) Function<B extends core.int>( | 43 Function<B extends core.int>(int x); |
44 int x); | 44 typedef F14<T> = List<T> Function(int y, {Function x}) |
45 typedef F8<T> | 45 Function<B extends core.int>(int x); |
46 = Function Function(int x2, | 46 typedef F15<T> = List<T> Function(int x1, [List<T> x]) |
47 [core.List<core.int> x3]) Function<B extends core.int>(int x); | 47 Function<B extends core.int>(int x); |
48 typedef F9<T> | 48 typedef F16<T> = Function(Function x1) Function<B extends core.int>(int x); |
49 = List<Function> Function({int x}) Function<B extends core.int>(int x); | 49 typedef F17<T> = Function(int x, [core.List<core.int> x1]) |
50 typedef F10<T> | 50 Function<B extends core.int>(int x); |
51 = List<Function> Function( | 51 typedef F18<T> = void Function(int x1, {int x}) Function<B extends core.int>( |
52 core.List<core.int> x) Function<B extends core.int>(int x); | 52 int x); |
53 typedef F11<T> | 53 typedef F19<T> = void Function([core.List<core.int> x]) |
54 = core.List<core.int> Function(int x1, | 54 Function<B extends core.int>(int x); |
55 [int x]) Function<B extends core.int>(int x); | 55 typedef F20<T> = int Function<A>(core.List<core.int> x) |
56 typedef F12<T> | 56 Function<B extends core.int>(int x); |
57 = core.List<core.int> Function( | 57 typedef F21<T> = core.List<core.int> Function<A>(List<T> x) |
58 [List<Function> x1]) Function<B extends core.int>(int x); | 58 Function<B extends core.int>(int x); |
59 typedef F13<T> | 59 typedef F22<T> = A Function<A>() Function<B extends core.int>(int x); |
60 = core.List<core.int> Function({List<T> x}) Function<B extends core.int>( | 60 typedef F23<T> = B Function(List<T> x) Function<B extends core.int>(int x); |
61 int x); | |
62 typedef F14<T> | |
63 = List<T> Function(int y, {Function x}) Function<B extends core.int>(int x); | |
64 typedef F15<T> | |
65 = List<T> Function(int x1, [List<T> x]) Function<B extends core.int>(int x); | |
66 typedef F16<T> | |
67 = Function(Function x1) Function<B extends core.int>(int x); | |
68 typedef F17<T> | |
69 = Function(int x, [core.List<core.int> x1]) Function<B extends core.int>( | |
70 int x); | |
71 typedef F18<T> | |
72 = void Function(int x1, {int x}) Function<B extends core.int>(int x); | |
73 typedef F19<T> | |
74 = void Function([core.List<core.int> x]) Function<B extends core.int>( | |
75 int x); | |
76 typedef F20<T> | |
77 = int Function<A>(core.List<core.int> x) Function<B extends core.int>( | |
78 int x); | |
79 typedef F21<T> | |
80 = core.List<core.int> Function<A>(List<T> x) Function<B extends core.int>( | |
81 int x); | |
82 typedef F22<T> | |
83 = A Function<A>() Function<B extends core.int>(int x); | |
84 typedef F23<T> | |
85 = B Function(List<T> x) Function<B extends core.int>(int x); | |
86 | 61 |
87 int f0(int y, [List<int> x]) => null; | 62 int f0(int y, [List<int> x]) => null; |
88 List<Function> f1(int x0, [core.List<core.int> x]) => null; | 63 List<Function> f1(int x0, [core.List<core.int> x]) => null; |
89 List<int> f2([List<Function> x]) => null; | 64 List<int> f2([List<Function> x]) => null; |
90 void f3(Function x) => null; | 65 void f3(Function x) => null; |
91 A f4<A>(List<A> x) => null; | 66 A f4<A>(List<A> x) => null; |
92 int Function(int x0, {Function x}) f5<B extends core.int>(int x) => null; | 67 int Function(int x0, {Function x}) f5<B extends core.int>(int x) => null; |
93 int Function([List<int> x]) f6<B extends core.int>(int x) => null; | 68 int Function([List<int> x]) f6<B extends core.int>(int x) => null; |
94 Function Function(int y, [Function x]) f7<B extends core.int>(int x) => null; | 69 Function Function(int y, [Function x]) f7<B extends core.int>(int x) => null; |
95 Function Function(int x0, [core.List<core.int> x1]) f8<B extends core.int>( | 70 Function Function(int x0, [core.List<core.int> x1]) f8<B extends core.int>( |
(...skipping 29 matching lines...) Expand all Loading... |
125 final bool tIsDynamic; | 100 final bool tIsDynamic; |
126 | 101 |
127 int Function(int y, [List<T> x]) x0; | 102 int Function(int y, [List<T> x]) x0; |
128 List<Function> Function(int x0, [core.List<core.int> x]) x1; | 103 List<Function> Function(int x0, [core.List<core.int> x]) x1; |
129 List<T> Function([List<Function> x]) x2; | 104 List<T> Function([List<Function> x]) x2; |
130 void Function(Function x) x3; | 105 void Function(Function x) x3; |
131 A Function<A>(List<A> x) x4; | 106 A Function<A>(List<A> x) x4; |
132 int Function(int x1, {Function x}) Function<B extends core.int>(int x) x5; | 107 int Function(int x1, {Function x}) Function<B extends core.int>(int x) x5; |
133 int Function([List<T> x]) Function<B extends core.int>(int x) x6; | 108 int Function([List<T> x]) Function<B extends core.int>(int x) x6; |
134 Function Function(int y, [Function x]) Function<B extends core.int>(int x) x7; | 109 Function Function(int y, [Function x]) Function<B extends core.int>(int x) x7; |
135 Function Function(int x2, | 110 Function Function(int x2, [core.List<core.int> x3]) |
136 [core.List<core.int> x3]) Function<B extends core.int>(int x) x8; | 111 Function<B extends core.int>(int x) x8; |
137 List<Function> Function({int x}) Function<B extends core.int>(int x) x9; | 112 List<Function> Function({int x}) Function<B extends core.int>(int x) x9; |
138 List<Function> Function(core.List<core.int> x) Function<B extends core.int>( | 113 List<Function> Function(core.List<core.int> x) Function<B extends core.int>( |
139 int x) x10; | 114 int x) x10; |
140 core.List<core.int> Function(int x1, [int x]) Function<B extends core.int>( | 115 core.List<core.int> Function(int x1, [int x]) Function<B extends core.int>( |
141 int x) x11; | 116 int x) x11; |
142 core.List<core.int> Function( | 117 core.List<core.int> Function([List<Function> x1]) |
143 [List<Function> x1]) Function<B extends core.int>(int x) x12; | 118 Function<B extends core.int>(int x) x12; |
144 core.List<core.int> Function({List<T> x}) Function<B extends core.int>(int x) | 119 core.List<core.int> Function({List<T> x}) Function<B extends core.int>(int x) |
145 x13; | 120 x13; |
146 List<T> Function(int y, {Function x}) Function<B extends core.int>(int x) x14; | 121 List<T> Function(int y, {Function x}) Function<B extends core.int>(int x) x14; |
147 List<T> Function(int x1, [List<T> x]) Function<B extends core.int>(int x) x15; | 122 List<T> Function(int x1, [List<T> x]) Function<B extends core.int>(int x) x15; |
148 Function(Function x1) Function<B extends core.int>(int x) x16; | 123 Function(Function x1) Function<B extends core.int>(int x) x16; |
149 Function(int x, [core.List<core.int> x1]) Function<B extends core.int>(int x) | 124 Function(int x, [core.List<core.int> x1]) Function<B extends core.int>(int x) |
150 x17; | 125 x17; |
151 void Function(int x1, {int x}) Function<B extends core.int>(int x) x18; | 126 void Function(int x1, {int x}) Function<B extends core.int>(int x) x18; |
152 void Function([core.List<core.int> x]) Function<B extends core.int>(int x) | 127 void Function([core.List<core.int> x]) Function<B extends core.int>(int x) |
153 x19; | 128 x19; |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 x0 = confuse(m0); | 222 x0 = confuse(m0); |
248 l0 = confuse(m0); | 223 l0 = confuse(m0); |
249 if (!tIsBool) { | 224 if (!tIsBool) { |
250 Expect.isTrue(f0 is F0<int>); | 225 Expect.isTrue(f0 is F0<int>); |
251 Expect.isFalse(f0 is F0<bool>); | 226 Expect.isFalse(f0 is F0<bool>); |
252 Expect.isTrue(confuse(f0) is F0<int>); | 227 Expect.isTrue(confuse(f0) is F0<int>); |
253 Expect.isFalse(confuse(f0) is F0<bool>); | 228 Expect.isFalse(confuse(f0) is F0<bool>); |
254 Expect.equals(tIsDynamic, m0 is F0<bool>); | 229 Expect.equals(tIsDynamic, m0 is F0<bool>); |
255 Expect.equals(tIsDynamic, confuse(m0) is F0<bool>); | 230 Expect.equals(tIsDynamic, confuse(m0) is F0<bool>); |
256 } else { | 231 } else { |
257 if (inCheckedMode) { | 232 if (typeAssertionsEnabled) { |
258 Expect.throws(() { | 233 Expect.throws(() { |
259 x0 = (f0 as dynamic); | 234 x0 = (f0 as dynamic); |
260 }); | 235 }); |
261 Expect.throws(() { | 236 Expect.throws(() { |
262 x0 = confuse(f0); | 237 x0 = confuse(f0); |
263 }); | 238 }); |
264 int Function(int y, [List<T> x]) l0; | 239 int Function(int y, [List<T> x]) l0; |
265 Expect.throws(() { | 240 Expect.throws(() { |
266 l0 = (f0 as dynamic); | 241 l0 = (f0 as dynamic); |
267 }); | 242 }); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 x2 = confuse(m2); | 299 x2 = confuse(m2); |
325 l2 = confuse(m2); | 300 l2 = confuse(m2); |
326 if (!tIsBool) { | 301 if (!tIsBool) { |
327 Expect.isTrue(f2 is F2<int>); | 302 Expect.isTrue(f2 is F2<int>); |
328 Expect.isFalse(f2 is F2<bool>); | 303 Expect.isFalse(f2 is F2<bool>); |
329 Expect.isTrue(confuse(f2) is F2<int>); | 304 Expect.isTrue(confuse(f2) is F2<int>); |
330 Expect.isFalse(confuse(f2) is F2<bool>); | 305 Expect.isFalse(confuse(f2) is F2<bool>); |
331 Expect.equals(tIsDynamic, m2 is F2<bool>); | 306 Expect.equals(tIsDynamic, m2 is F2<bool>); |
332 Expect.equals(tIsDynamic, confuse(m2) is F2<bool>); | 307 Expect.equals(tIsDynamic, confuse(m2) is F2<bool>); |
333 } else { | 308 } else { |
334 if (inCheckedMode) { | 309 if (typeAssertionsEnabled) { |
335 Expect.throws(() { | 310 Expect.throws(() { |
336 x2 = (f2 as dynamic); | 311 x2 = (f2 as dynamic); |
337 }); | 312 }); |
338 Expect.throws(() { | 313 Expect.throws(() { |
339 x2 = confuse(f2); | 314 x2 = confuse(f2); |
340 }); | 315 }); |
341 List<T> Function([List<Function> x]) l2; | 316 List<T> Function([List<Function> x]) l2; |
342 Expect.throws(() { | 317 Expect.throws(() { |
343 l2 = (f2 as dynamic); | 318 l2 = (f2 as dynamic); |
344 }); | 319 }); |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 int Function(int x1, {Function x}) Function<B extends core.int>(int x) l5; | 384 int Function(int x1, {Function x}) Function<B extends core.int>(int x) l5; |
410 // The static function f5 sets `T` to `int`. | 385 // The static function f5 sets `T` to `int`. |
411 if (!tIsBool) { | 386 if (!tIsBool) { |
412 x5 = f5 as dynamic; | 387 x5 = f5 as dynamic; |
413 l5 = f5 as dynamic; | 388 l5 = f5 as dynamic; |
414 x5 = confuse(f5); | 389 x5 = confuse(f5); |
415 l5 = confuse(f5); | 390 l5 = confuse(f5); |
416 } | 391 } |
417 | 392 |
418 Expect.isTrue(m5 is F5); | 393 Expect.isTrue(m5 is F5); |
419 Expect.isTrue(m5 is int Function(int x1, | 394 Expect.isTrue(m5 is int Function(int x1, {Function x}) |
420 {Function x}) Function<B extends core.int>(int x)); | 395 Function<B extends core.int>(int x)); |
421 Expect.isTrue(confuse(m5) is F5); | 396 Expect.isTrue(confuse(m5) is F5); |
422 // In checked mode, verifies the type. | 397 // In checked mode, verifies the type. |
423 x5 = m5; | 398 x5 = m5; |
424 l5 = m5; | 399 l5 = m5; |
425 x5 = confuse(m5); | 400 x5 = confuse(m5); |
426 l5 = confuse(m5); | 401 l5 = confuse(m5); |
427 } | 402 } |
428 | 403 |
429 /// int Function([List<T> x]) Function<B extends core.int>(int x) | 404 /// int Function([List<T> x]) Function<B extends core.int>(int x) |
430 void testF6() { | 405 void testF6() { |
(...skipping 19 matching lines...) Expand all Loading... |
450 x6 = confuse(m6); | 425 x6 = confuse(m6); |
451 l6 = confuse(m6); | 426 l6 = confuse(m6); |
452 if (!tIsBool) { | 427 if (!tIsBool) { |
453 Expect.isTrue(f6 is F6<int>); | 428 Expect.isTrue(f6 is F6<int>); |
454 Expect.isFalse(f6 is F6<bool>); | 429 Expect.isFalse(f6 is F6<bool>); |
455 Expect.isTrue(confuse(f6) is F6<int>); | 430 Expect.isTrue(confuse(f6) is F6<int>); |
456 Expect.isFalse(confuse(f6) is F6<bool>); | 431 Expect.isFalse(confuse(f6) is F6<bool>); |
457 Expect.equals(tIsDynamic, m6 is F6<bool>); | 432 Expect.equals(tIsDynamic, m6 is F6<bool>); |
458 Expect.equals(tIsDynamic, confuse(m6) is F6<bool>); | 433 Expect.equals(tIsDynamic, confuse(m6) is F6<bool>); |
459 } else { | 434 } else { |
460 if (inCheckedMode) { | 435 if (typeAssertionsEnabled) { |
461 Expect.throws(() { | 436 Expect.throws(() { |
462 x6 = (f6 as dynamic); | 437 x6 = (f6 as dynamic); |
463 }); | 438 }); |
464 Expect.throws(() { | 439 Expect.throws(() { |
465 x6 = confuse(f6); | 440 x6 = confuse(f6); |
466 }); | 441 }); |
467 int Function([List<T> x]) Function<B extends core.int>(int x) l6; | 442 int Function([List<T> x]) Function<B extends core.int>(int x) l6; |
468 Expect.throws(() { | 443 Expect.throws(() { |
469 l6 = (f6 as dynamic); | 444 l6 = (f6 as dynamic); |
470 }); | 445 }); |
(...skipping 17 matching lines...) Expand all Loading... |
488 l7; | 463 l7; |
489 // The static function f7 sets `T` to `int`. | 464 // The static function f7 sets `T` to `int`. |
490 if (!tIsBool) { | 465 if (!tIsBool) { |
491 x7 = f7 as dynamic; | 466 x7 = f7 as dynamic; |
492 l7 = f7 as dynamic; | 467 l7 = f7 as dynamic; |
493 x7 = confuse(f7); | 468 x7 = confuse(f7); |
494 l7 = confuse(f7); | 469 l7 = confuse(f7); |
495 } | 470 } |
496 | 471 |
497 Expect.isTrue(m7 is F7); | 472 Expect.isTrue(m7 is F7); |
498 Expect.isTrue(m7 is Function Function(int y, | 473 Expect.isTrue(m7 is Function Function(int y, [Function x]) |
499 [Function x]) Function<B extends core.int>(int x)); | 474 Function<B extends core.int>(int x)); |
500 Expect.isTrue(confuse(m7) is F7); | 475 Expect.isTrue(confuse(m7) is F7); |
501 // In checked mode, verifies the type. | 476 // In checked mode, verifies the type. |
502 x7 = m7; | 477 x7 = m7; |
503 l7 = m7; | 478 l7 = m7; |
504 x7 = confuse(m7); | 479 x7 = confuse(m7); |
505 l7 = confuse(m7); | 480 l7 = confuse(m7); |
506 } | 481 } |
507 | 482 |
508 /// Function Function(int x2, [core.List<core.int> x3]) Function<B extends cor
e.int>(int x) | 483 /// Function Function(int x2, [core.List<core.int> x3]) Function<B extends cor
e.int>(int x) |
509 void testF8() { | 484 void testF8() { |
510 Expect.isTrue(f8 is F8); | 485 Expect.isTrue(f8 is F8); |
511 Expect.isTrue(confuse(f8) is F8); | 486 Expect.isTrue(confuse(f8) is F8); |
512 // In checked mode, verifies the type. | 487 // In checked mode, verifies the type. |
513 Function Function(int x2, | 488 Function Function(int x2, [core.List<core.int> x3]) |
514 [core.List<core.int> x3]) Function<B extends core.int>(int x) l8; | 489 Function<B extends core.int>(int x) l8; |
515 // The static function f8 sets `T` to `int`. | 490 // The static function f8 sets `T` to `int`. |
516 if (!tIsBool) { | 491 if (!tIsBool) { |
517 x8 = f8 as dynamic; | 492 x8 = f8 as dynamic; |
518 l8 = f8 as dynamic; | 493 l8 = f8 as dynamic; |
519 x8 = confuse(f8); | 494 x8 = confuse(f8); |
520 l8 = confuse(f8); | 495 l8 = confuse(f8); |
521 } | 496 } |
522 | 497 |
523 Expect.isTrue(m8 is F8); | 498 Expect.isTrue(m8 is F8); |
524 Expect.isTrue(m8 is Function Function(int x2, | 499 Expect.isTrue(m8 is Function Function(int x2, [core.List<core.int> x3]) |
525 [core.List<core.int> x3]) Function<B extends core.int>(int x)); | 500 Function<B extends core.int>(int x)); |
526 Expect.isTrue(confuse(m8) is F8); | 501 Expect.isTrue(confuse(m8) is F8); |
527 // In checked mode, verifies the type. | 502 // In checked mode, verifies the type. |
528 x8 = m8; | 503 x8 = m8; |
529 l8 = m8; | 504 l8 = m8; |
530 x8 = confuse(m8); | 505 x8 = confuse(m8); |
531 l8 = confuse(m8); | 506 l8 = confuse(m8); |
532 } | 507 } |
533 | 508 |
534 /// List<Function> Function({int x}) Function<B extends core.int>(int x) | 509 /// List<Function> Function({int x}) Function<B extends core.int>(int x) |
535 void testF9() { | 510 void testF9() { |
536 Expect.isTrue(f9 is F9); | 511 Expect.isTrue(f9 is F9); |
537 Expect.isTrue(confuse(f9) is F9); | 512 Expect.isTrue(confuse(f9) is F9); |
538 // In checked mode, verifies the type. | 513 // In checked mode, verifies the type. |
539 List<Function> Function({int x}) Function<B extends core.int>(int x) l9; | 514 List<Function> Function({int x}) Function<B extends core.int>(int x) l9; |
540 // The static function f9 sets `T` to `int`. | 515 // The static function f9 sets `T` to `int`. |
541 if (!tIsBool) { | 516 if (!tIsBool) { |
542 x9 = f9 as dynamic; | 517 x9 = f9 as dynamic; |
543 l9 = f9 as dynamic; | 518 l9 = f9 as dynamic; |
544 x9 = confuse(f9); | 519 x9 = confuse(f9); |
545 l9 = confuse(f9); | 520 l9 = confuse(f9); |
546 } | 521 } |
547 | 522 |
548 Expect.isTrue(m9 is F9); | 523 Expect.isTrue(m9 is F9); |
549 Expect.isTrue(m9 is List<Function> Function( | 524 Expect.isTrue(m9 is List<Function> Function({int x}) |
550 {int x}) Function<B extends core.int>(int x)); | 525 Function<B extends core.int>(int x)); |
551 Expect.isTrue(confuse(m9) is F9); | 526 Expect.isTrue(confuse(m9) is F9); |
552 // In checked mode, verifies the type. | 527 // In checked mode, verifies the type. |
553 x9 = m9; | 528 x9 = m9; |
554 l9 = m9; | 529 l9 = m9; |
555 x9 = confuse(m9); | 530 x9 = confuse(m9); |
556 l9 = confuse(m9); | 531 l9 = confuse(m9); |
557 } | 532 } |
558 | 533 |
559 /// List<Function> Function(core.List<core.int> x) Function<B extends core.int
>(int x) | 534 /// List<Function> Function(core.List<core.int> x) Function<B extends core.int
>(int x) |
560 void testF10() { | 535 void testF10() { |
561 Expect.isTrue(f10 is F10); | 536 Expect.isTrue(f10 is F10); |
562 Expect.isTrue(confuse(f10) is F10); | 537 Expect.isTrue(confuse(f10) is F10); |
563 // In checked mode, verifies the type. | 538 // In checked mode, verifies the type. |
564 List<Function> Function(core.List<core.int> x) Function<B extends core.int>( | 539 List<Function> Function(core.List<core.int> x) Function<B extends core.int>( |
565 int x) l10; | 540 int x) l10; |
566 // The static function f10 sets `T` to `int`. | 541 // The static function f10 sets `T` to `int`. |
567 if (!tIsBool) { | 542 if (!tIsBool) { |
568 x10 = f10 as dynamic; | 543 x10 = f10 as dynamic; |
569 l10 = f10 as dynamic; | 544 l10 = f10 as dynamic; |
570 x10 = confuse(f10); | 545 x10 = confuse(f10); |
571 l10 = confuse(f10); | 546 l10 = confuse(f10); |
572 } | 547 } |
573 | 548 |
574 Expect.isTrue(m10 is F10); | 549 Expect.isTrue(m10 is F10); |
575 Expect.isTrue(m10 is List<Function> Function( | 550 Expect.isTrue(m10 is List<Function> Function(core.List<core.int> x) |
576 core.List<core.int> x) Function<B extends core.int>(int x)); | 551 Function<B extends core.int>(int x)); |
577 Expect.isTrue(confuse(m10) is F10); | 552 Expect.isTrue(confuse(m10) is F10); |
578 // In checked mode, verifies the type. | 553 // In checked mode, verifies the type. |
579 x10 = m10; | 554 x10 = m10; |
580 l10 = m10; | 555 l10 = m10; |
581 x10 = confuse(m10); | 556 x10 = confuse(m10); |
582 l10 = confuse(m10); | 557 l10 = confuse(m10); |
583 } | 558 } |
584 | 559 |
585 /// core.List<core.int> Function(int x1, [int x]) Function<B extends core.int>
(int x) | 560 /// core.List<core.int> Function(int x1, [int x]) Function<B extends core.int>
(int x) |
586 void testF11() { | 561 void testF11() { |
587 Expect.isTrue(f11 is F11); | 562 Expect.isTrue(f11 is F11); |
588 Expect.isTrue(confuse(f11) is F11); | 563 Expect.isTrue(confuse(f11) is F11); |
589 // In checked mode, verifies the type. | 564 // In checked mode, verifies the type. |
590 core.List<core.int> Function(int x1, [int x]) Function<B extends core.int>( | 565 core.List<core.int> Function(int x1, [int x]) Function<B extends core.int>( |
591 int x) l11; | 566 int x) l11; |
592 // The static function f11 sets `T` to `int`. | 567 // The static function f11 sets `T` to `int`. |
593 if (!tIsBool) { | 568 if (!tIsBool) { |
594 x11 = f11 as dynamic; | 569 x11 = f11 as dynamic; |
595 l11 = f11 as dynamic; | 570 l11 = f11 as dynamic; |
596 x11 = confuse(f11); | 571 x11 = confuse(f11); |
597 l11 = confuse(f11); | 572 l11 = confuse(f11); |
598 } | 573 } |
599 | 574 |
600 Expect.isTrue(m11 is F11); | 575 Expect.isTrue(m11 is F11); |
601 Expect.isTrue(m11 is core.List<core.int> Function(int x1, | 576 Expect.isTrue(m11 is core.List<core.int> Function(int x1, [int x]) |
602 [int x]) Function<B extends core.int>(int x)); | 577 Function<B extends core.int>(int x)); |
603 Expect.isTrue(confuse(m11) is F11); | 578 Expect.isTrue(confuse(m11) is F11); |
604 // In checked mode, verifies the type. | 579 // In checked mode, verifies the type. |
605 x11 = m11; | 580 x11 = m11; |
606 l11 = m11; | 581 l11 = m11; |
607 x11 = confuse(m11); | 582 x11 = confuse(m11); |
608 l11 = confuse(m11); | 583 l11 = confuse(m11); |
609 } | 584 } |
610 | 585 |
611 /// core.List<core.int> Function([List<Function> x1]) Function<B extends core.
int>(int x) | 586 /// core.List<core.int> Function([List<Function> x1]) Function<B extends core.
int>(int x) |
612 void testF12() { | 587 void testF12() { |
613 Expect.isTrue(f12 is F12); | 588 Expect.isTrue(f12 is F12); |
614 Expect.isTrue(confuse(f12) is F12); | 589 Expect.isTrue(confuse(f12) is F12); |
615 // In checked mode, verifies the type. | 590 // In checked mode, verifies the type. |
616 core.List<core.int> Function( | 591 core.List<core.int> Function([List<Function> x1]) |
617 [List<Function> x1]) Function<B extends core.int>(int x) l12; | 592 Function<B extends core.int>(int x) l12; |
618 // The static function f12 sets `T` to `int`. | 593 // The static function f12 sets `T` to `int`. |
619 if (!tIsBool) { | 594 if (!tIsBool) { |
620 x12 = f12 as dynamic; | 595 x12 = f12 as dynamic; |
621 l12 = f12 as dynamic; | 596 l12 = f12 as dynamic; |
622 x12 = confuse(f12); | 597 x12 = confuse(f12); |
623 l12 = confuse(f12); | 598 l12 = confuse(f12); |
624 } | 599 } |
625 | 600 |
626 Expect.isTrue(m12 is F12); | 601 Expect.isTrue(m12 is F12); |
627 Expect.isTrue(m12 is core.List<core.int> Function( | 602 Expect.isTrue(m12 is core.List<core.int> Function([List<Function> x1]) |
628 [List<Function> x1]) Function<B extends core.int>(int x)); | 603 Function<B extends core.int>(int x)); |
629 Expect.isTrue(confuse(m12) is F12); | 604 Expect.isTrue(confuse(m12) is F12); |
630 // In checked mode, verifies the type. | 605 // In checked mode, verifies the type. |
631 x12 = m12; | 606 x12 = m12; |
632 l12 = m12; | 607 l12 = m12; |
633 x12 = confuse(m12); | 608 x12 = confuse(m12); |
634 l12 = confuse(m12); | 609 l12 = confuse(m12); |
635 } | 610 } |
636 | 611 |
637 /// core.List<core.int> Function({List<T> x}) Function<B extends core.int>(int
x) | 612 /// core.List<core.int> Function({List<T> x}) Function<B extends core.int>(int
x) |
638 void testF13() { | 613 void testF13() { |
639 Expect.isTrue(f13 is F13); | 614 Expect.isTrue(f13 is F13); |
640 Expect.isTrue(confuse(f13) is F13); | 615 Expect.isTrue(confuse(f13) is F13); |
641 // In checked mode, verifies the type. | 616 // In checked mode, verifies the type. |
642 core.List<core.int> Function({List<T> x}) Function<B extends core.int>( | 617 core.List<core.int> Function({List<T> x}) Function<B extends core.int>( |
643 int x) l13; | 618 int x) l13; |
644 // The static function f13 sets `T` to `int`. | 619 // The static function f13 sets `T` to `int`. |
645 if (!tIsBool) { | 620 if (!tIsBool) { |
646 x13 = f13 as dynamic; | 621 x13 = f13 as dynamic; |
647 l13 = f13 as dynamic; | 622 l13 = f13 as dynamic; |
648 x13 = confuse(f13); | 623 x13 = confuse(f13); |
649 l13 = confuse(f13); | 624 l13 = confuse(f13); |
650 } | 625 } |
651 | 626 |
652 Expect.isTrue(m13 is F13); | 627 Expect.isTrue(m13 is F13); |
653 Expect.isTrue(m13 is core.List<core.int> Function( | 628 Expect.isTrue(m13 is core.List<core.int> Function({List<T> x}) |
654 {List<T> x}) Function<B extends core.int>(int x)); | 629 Function<B extends core.int>(int x)); |
655 Expect.isTrue(confuse(m13) is F13); | 630 Expect.isTrue(confuse(m13) is F13); |
656 // In checked mode, verifies the type. | 631 // In checked mode, verifies the type. |
657 x13 = m13; | 632 x13 = m13; |
658 l13 = m13; | 633 l13 = m13; |
659 x13 = confuse(m13); | 634 x13 = confuse(m13); |
660 l13 = confuse(m13); | 635 l13 = confuse(m13); |
661 if (!tIsBool) { | 636 if (!tIsBool) { |
662 Expect.isTrue(f13 is F13<int>); | 637 Expect.isTrue(f13 is F13<int>); |
663 Expect.isFalse(f13 is F13<bool>); | 638 Expect.isFalse(f13 is F13<bool>); |
664 Expect.isTrue(confuse(f13) is F13<int>); | 639 Expect.isTrue(confuse(f13) is F13<int>); |
665 Expect.isFalse(confuse(f13) is F13<bool>); | 640 Expect.isFalse(confuse(f13) is F13<bool>); |
666 Expect.equals(tIsDynamic, m13 is F13<bool>); | 641 Expect.equals(tIsDynamic, m13 is F13<bool>); |
667 Expect.equals(tIsDynamic, confuse(m13) is F13<bool>); | 642 Expect.equals(tIsDynamic, confuse(m13) is F13<bool>); |
668 } else { | 643 } else { |
669 if (inCheckedMode) { | 644 if (typeAssertionsEnabled) { |
670 Expect.throws(() { | 645 Expect.throws(() { |
671 x13 = (f13 as dynamic); | 646 x13 = (f13 as dynamic); |
672 }); | 647 }); |
673 Expect.throws(() { | 648 Expect.throws(() { |
674 x13 = confuse(f13); | 649 x13 = confuse(f13); |
675 }); | 650 }); |
676 core.List<core.int> Function({List<T> x}) Function<B extends core.int>( | 651 core.List<core.int> Function({List<T> x}) Function<B extends core.int>( |
677 int x) l13; | 652 int x) l13; |
678 Expect.throws(() { | 653 Expect.throws(() { |
679 l13 = (f13 as dynamic); | 654 l13 = (f13 as dynamic); |
(...skipping 19 matching lines...) Expand all Loading... |
699 l14; | 674 l14; |
700 // The static function f14 sets `T` to `int`. | 675 // The static function f14 sets `T` to `int`. |
701 if (!tIsBool) { | 676 if (!tIsBool) { |
702 x14 = f14 as dynamic; | 677 x14 = f14 as dynamic; |
703 l14 = f14 as dynamic; | 678 l14 = f14 as dynamic; |
704 x14 = confuse(f14); | 679 x14 = confuse(f14); |
705 l14 = confuse(f14); | 680 l14 = confuse(f14); |
706 } | 681 } |
707 | 682 |
708 Expect.isTrue(m14 is F14); | 683 Expect.isTrue(m14 is F14); |
709 Expect.isTrue(m14 is List<T> Function(int y, | 684 Expect.isTrue(m14 is List<T> Function(int y, {Function x}) |
710 {Function x}) Function<B extends core.int>(int x)); | 685 Function<B extends core.int>(int x)); |
711 Expect.isTrue(confuse(m14) is F14); | 686 Expect.isTrue(confuse(m14) is F14); |
712 // In checked mode, verifies the type. | 687 // In checked mode, verifies the type. |
713 x14 = m14; | 688 x14 = m14; |
714 l14 = m14; | 689 l14 = m14; |
715 x14 = confuse(m14); | 690 x14 = confuse(m14); |
716 l14 = confuse(m14); | 691 l14 = confuse(m14); |
717 if (!tIsBool) { | 692 if (!tIsBool) { |
718 Expect.isTrue(f14 is F14<int>); | 693 Expect.isTrue(f14 is F14<int>); |
719 Expect.isFalse(f14 is F14<bool>); | 694 Expect.isFalse(f14 is F14<bool>); |
720 Expect.isTrue(confuse(f14) is F14<int>); | 695 Expect.isTrue(confuse(f14) is F14<int>); |
721 Expect.isFalse(confuse(f14) is F14<bool>); | 696 Expect.isFalse(confuse(f14) is F14<bool>); |
722 Expect.equals(tIsDynamic, m14 is F14<bool>); | 697 Expect.equals(tIsDynamic, m14 is F14<bool>); |
723 Expect.equals(tIsDynamic, confuse(m14) is F14<bool>); | 698 Expect.equals(tIsDynamic, confuse(m14) is F14<bool>); |
724 } else { | 699 } else { |
725 if (inCheckedMode) { | 700 if (typeAssertionsEnabled) { |
726 Expect.throws(() { | 701 Expect.throws(() { |
727 x14 = (f14 as dynamic); | 702 x14 = (f14 as dynamic); |
728 }); | 703 }); |
729 Expect.throws(() { | 704 Expect.throws(() { |
730 x14 = confuse(f14); | 705 x14 = confuse(f14); |
731 }); | 706 }); |
732 List<T> Function(int y, {Function x}) Function<B extends core.int>( | 707 List<T> Function(int y, {Function x}) Function<B extends core.int>( |
733 int x) l14; | 708 int x) l14; |
734 Expect.throws(() { | 709 Expect.throws(() { |
735 l14 = (f14 as dynamic); | 710 l14 = (f14 as dynamic); |
(...skipping 19 matching lines...) Expand all Loading... |
755 l15; | 730 l15; |
756 // The static function f15 sets `T` to `int`. | 731 // The static function f15 sets `T` to `int`. |
757 if (!tIsBool) { | 732 if (!tIsBool) { |
758 x15 = f15 as dynamic; | 733 x15 = f15 as dynamic; |
759 l15 = f15 as dynamic; | 734 l15 = f15 as dynamic; |
760 x15 = confuse(f15); | 735 x15 = confuse(f15); |
761 l15 = confuse(f15); | 736 l15 = confuse(f15); |
762 } | 737 } |
763 | 738 |
764 Expect.isTrue(m15 is F15); | 739 Expect.isTrue(m15 is F15); |
765 Expect.isTrue(m15 is List<T> Function(int x1, | 740 Expect.isTrue(m15 is List<T> Function(int x1, [List<T> x]) |
766 [List<T> x]) Function<B extends core.int>(int x)); | 741 Function<B extends core.int>(int x)); |
767 Expect.isTrue(confuse(m15) is F15); | 742 Expect.isTrue(confuse(m15) is F15); |
768 // In checked mode, verifies the type. | 743 // In checked mode, verifies the type. |
769 x15 = m15; | 744 x15 = m15; |
770 l15 = m15; | 745 l15 = m15; |
771 x15 = confuse(m15); | 746 x15 = confuse(m15); |
772 l15 = confuse(m15); | 747 l15 = confuse(m15); |
773 if (!tIsBool) { | 748 if (!tIsBool) { |
774 Expect.isTrue(f15 is F15<int>); | 749 Expect.isTrue(f15 is F15<int>); |
775 Expect.isFalse(f15 is F15<bool>); | 750 Expect.isFalse(f15 is F15<bool>); |
776 Expect.isTrue(confuse(f15) is F15<int>); | 751 Expect.isTrue(confuse(f15) is F15<int>); |
777 Expect.isFalse(confuse(f15) is F15<bool>); | 752 Expect.isFalse(confuse(f15) is F15<bool>); |
778 Expect.equals(tIsDynamic, m15 is F15<bool>); | 753 Expect.equals(tIsDynamic, m15 is F15<bool>); |
779 Expect.equals(tIsDynamic, confuse(m15) is F15<bool>); | 754 Expect.equals(tIsDynamic, confuse(m15) is F15<bool>); |
780 } else { | 755 } else { |
781 if (inCheckedMode) { | 756 if (typeAssertionsEnabled) { |
782 Expect.throws(() { | 757 Expect.throws(() { |
783 x15 = (f15 as dynamic); | 758 x15 = (f15 as dynamic); |
784 }); | 759 }); |
785 Expect.throws(() { | 760 Expect.throws(() { |
786 x15 = confuse(f15); | 761 x15 = confuse(f15); |
787 }); | 762 }); |
788 List<T> Function(int x1, [List<T> x]) Function<B extends core.int>( | 763 List<T> Function(int x1, [List<T> x]) Function<B extends core.int>( |
789 int x) l15; | 764 int x) l15; |
790 Expect.throws(() { | 765 Expect.throws(() { |
791 l15 = (f15 as dynamic); | 766 l15 = (f15 as dynamic); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
836 int x) l17; | 811 int x) l17; |
837 // The static function f17 sets `T` to `int`. | 812 // The static function f17 sets `T` to `int`. |
838 if (!tIsBool) { | 813 if (!tIsBool) { |
839 x17 = f17 as dynamic; | 814 x17 = f17 as dynamic; |
840 l17 = f17 as dynamic; | 815 l17 = f17 as dynamic; |
841 x17 = confuse(f17); | 816 x17 = confuse(f17); |
842 l17 = confuse(f17); | 817 l17 = confuse(f17); |
843 } | 818 } |
844 | 819 |
845 Expect.isTrue(m17 is F17); | 820 Expect.isTrue(m17 is F17); |
846 Expect.isTrue(m17 is Function(int x, | 821 Expect.isTrue(m17 is Function(int x, [core.List<core.int> x1]) |
847 [core.List<core.int> x1]) Function<B extends core.int>(int x)); | 822 Function<B extends core.int>(int x)); |
848 Expect.isTrue(confuse(m17) is F17); | 823 Expect.isTrue(confuse(m17) is F17); |
849 // In checked mode, verifies the type. | 824 // In checked mode, verifies the type. |
850 x17 = m17; | 825 x17 = m17; |
851 l17 = m17; | 826 l17 = m17; |
852 x17 = confuse(m17); | 827 x17 = confuse(m17); |
853 l17 = confuse(m17); | 828 l17 = confuse(m17); |
854 } | 829 } |
855 | 830 |
856 /// void Function(int x1, {int x}) Function<B extends core.int>(int x) | 831 /// void Function(int x1, {int x}) Function<B extends core.int>(int x) |
857 void testF18() { | 832 void testF18() { |
858 Expect.isTrue(f18 is F18); | 833 Expect.isTrue(f18 is F18); |
859 Expect.isTrue(confuse(f18) is F18); | 834 Expect.isTrue(confuse(f18) is F18); |
860 // In checked mode, verifies the type. | 835 // In checked mode, verifies the type. |
861 void Function(int x1, {int x}) Function<B extends core.int>(int x) l18; | 836 void Function(int x1, {int x}) Function<B extends core.int>(int x) l18; |
862 // The static function f18 sets `T` to `int`. | 837 // The static function f18 sets `T` to `int`. |
863 if (!tIsBool) { | 838 if (!tIsBool) { |
864 x18 = f18 as dynamic; | 839 x18 = f18 as dynamic; |
865 l18 = f18 as dynamic; | 840 l18 = f18 as dynamic; |
866 x18 = confuse(f18); | 841 x18 = confuse(f18); |
867 l18 = confuse(f18); | 842 l18 = confuse(f18); |
868 } | 843 } |
869 | 844 |
870 Expect.isTrue(m18 is F18); | 845 Expect.isTrue(m18 is F18); |
871 Expect.isTrue(m18 is void Function(int x1, | 846 Expect.isTrue(m18 is void Function(int x1, {int x}) |
872 {int x}) Function<B extends core.int>(int x)); | 847 Function<B extends core.int>(int x)); |
873 Expect.isTrue(confuse(m18) is F18); | 848 Expect.isTrue(confuse(m18) is F18); |
874 // In checked mode, verifies the type. | 849 // In checked mode, verifies the type. |
875 x18 = m18; | 850 x18 = m18; |
876 l18 = m18; | 851 l18 = m18; |
877 x18 = confuse(m18); | 852 x18 = confuse(m18); |
878 l18 = confuse(m18); | 853 l18 = confuse(m18); |
879 } | 854 } |
880 | 855 |
881 /// void Function([core.List<core.int> x]) Function<B extends core.int>(int x) | 856 /// void Function([core.List<core.int> x]) Function<B extends core.int>(int x) |
882 void testF19() { | 857 void testF19() { |
883 Expect.isTrue(f19 is F19); | 858 Expect.isTrue(f19 is F19); |
884 Expect.isTrue(confuse(f19) is F19); | 859 Expect.isTrue(confuse(f19) is F19); |
885 // In checked mode, verifies the type. | 860 // In checked mode, verifies the type. |
886 void Function([core.List<core.int> x]) Function<B extends core.int>(int x) | 861 void Function([core.List<core.int> x]) Function<B extends core.int>(int x) |
887 l19; | 862 l19; |
888 // The static function f19 sets `T` to `int`. | 863 // The static function f19 sets `T` to `int`. |
889 if (!tIsBool) { | 864 if (!tIsBool) { |
890 x19 = f19 as dynamic; | 865 x19 = f19 as dynamic; |
891 l19 = f19 as dynamic; | 866 l19 = f19 as dynamic; |
892 x19 = confuse(f19); | 867 x19 = confuse(f19); |
893 l19 = confuse(f19); | 868 l19 = confuse(f19); |
894 } | 869 } |
895 | 870 |
896 Expect.isTrue(m19 is F19); | 871 Expect.isTrue(m19 is F19); |
897 Expect.isTrue(m19 is void Function( | 872 Expect.isTrue(m19 is void Function([core.List<core.int> x]) |
898 [core.List<core.int> x]) Function<B extends core.int>(int x)); | 873 Function<B extends core.int>(int x)); |
899 Expect.isTrue(confuse(m19) is F19); | 874 Expect.isTrue(confuse(m19) is F19); |
900 // In checked mode, verifies the type. | 875 // In checked mode, verifies the type. |
901 x19 = m19; | 876 x19 = m19; |
902 l19 = m19; | 877 l19 = m19; |
903 x19 = confuse(m19); | 878 x19 = confuse(m19); |
904 l19 = confuse(m19); | 879 l19 = confuse(m19); |
905 } | 880 } |
906 | 881 |
907 /// int Function<A>(core.List<core.int> x) Function<B extends core.int>(int x) | 882 /// int Function<A>(core.List<core.int> x) Function<B extends core.int>(int x) |
908 void testF20() { | 883 void testF20() { |
909 Expect.isTrue(f20 is F20); | 884 Expect.isTrue(f20 is F20); |
910 Expect.isTrue(confuse(f20) is F20); | 885 Expect.isTrue(confuse(f20) is F20); |
911 // In checked mode, verifies the type. | 886 // In checked mode, verifies the type. |
912 int Function<A>(core.List<core.int> x) Function<B extends core.int>(int x) | 887 int Function<A>(core.List<core.int> x) Function<B extends core.int>(int x) |
913 l20; | 888 l20; |
914 // The static function f20 sets `T` to `int`. | 889 // The static function f20 sets `T` to `int`. |
915 if (!tIsBool) { | 890 if (!tIsBool) { |
916 x20 = f20 as dynamic; | 891 x20 = f20 as dynamic; |
917 l20 = f20 as dynamic; | 892 l20 = f20 as dynamic; |
918 x20 = confuse(f20); | 893 x20 = confuse(f20); |
919 l20 = confuse(f20); | 894 l20 = confuse(f20); |
920 } | 895 } |
921 | 896 |
922 Expect.isTrue(m20 is F20); | 897 Expect.isTrue(m20 is F20); |
923 Expect.isTrue(m20 is int Function<A>( | 898 Expect.isTrue(m20 is int Function<A>(core.List<core.int> x) |
924 core.List<core.int> x) Function<B extends core.int>(int x)); | 899 Function<B extends core.int>(int x)); |
925 Expect.isTrue(confuse(m20) is F20); | 900 Expect.isTrue(confuse(m20) is F20); |
926 // In checked mode, verifies the type. | 901 // In checked mode, verifies the type. |
927 x20 = m20; | 902 x20 = m20; |
928 l20 = m20; | 903 l20 = m20; |
929 x20 = confuse(m20); | 904 x20 = confuse(m20); |
930 l20 = confuse(m20); | 905 l20 = confuse(m20); |
931 } | 906 } |
932 | 907 |
933 /// core.List<core.int> Function<A>(List<T> x) Function<B extends core.int>(in
t x) | 908 /// core.List<core.int> Function<A>(List<T> x) Function<B extends core.int>(in
t x) |
934 void testF21() { | 909 void testF21() { |
935 Expect.isTrue(f21 is F21); | 910 Expect.isTrue(f21 is F21); |
936 Expect.isTrue(confuse(f21) is F21); | 911 Expect.isTrue(confuse(f21) is F21); |
937 // In checked mode, verifies the type. | 912 // In checked mode, verifies the type. |
938 core.List<core.int> Function<A>(List<T> x) Function<B extends core.int>( | 913 core.List<core.int> Function<A>(List<T> x) Function<B extends core.int>( |
939 int x) l21; | 914 int x) l21; |
940 // The static function f21 sets `T` to `int`. | 915 // The static function f21 sets `T` to `int`. |
941 if (!tIsBool) { | 916 if (!tIsBool) { |
942 x21 = f21 as dynamic; | 917 x21 = f21 as dynamic; |
943 l21 = f21 as dynamic; | 918 l21 = f21 as dynamic; |
944 x21 = confuse(f21); | 919 x21 = confuse(f21); |
945 l21 = confuse(f21); | 920 l21 = confuse(f21); |
946 } | 921 } |
947 | 922 |
948 Expect.isTrue(m21 is F21); | 923 Expect.isTrue(m21 is F21); |
949 Expect.isTrue(m21 is core.List<core.int> Function<A>( | 924 Expect.isTrue(m21 is core.List<core.int> Function<A>(List<T> x) |
950 List<T> x) Function<B extends core.int>(int x)); | 925 Function<B extends core.int>(int x)); |
951 Expect.isTrue(confuse(m21) is F21); | 926 Expect.isTrue(confuse(m21) is F21); |
952 // In checked mode, verifies the type. | 927 // In checked mode, verifies the type. |
953 x21 = m21; | 928 x21 = m21; |
954 l21 = m21; | 929 l21 = m21; |
955 x21 = confuse(m21); | 930 x21 = confuse(m21); |
956 l21 = confuse(m21); | 931 l21 = confuse(m21); |
957 if (!tIsBool) { | 932 if (!tIsBool) { |
958 Expect.isTrue(f21 is F21<int>); | 933 Expect.isTrue(f21 is F21<int>); |
959 Expect.isFalse(f21 is F21<bool>); | 934 Expect.isFalse(f21 is F21<bool>); |
960 Expect.isTrue(confuse(f21) is F21<int>); | 935 Expect.isTrue(confuse(f21) is F21<int>); |
961 Expect.isFalse(confuse(f21) is F21<bool>); | 936 Expect.isFalse(confuse(f21) is F21<bool>); |
962 Expect.equals(tIsDynamic, m21 is F21<bool>); | 937 Expect.equals(tIsDynamic, m21 is F21<bool>); |
963 Expect.equals(tIsDynamic, confuse(m21) is F21<bool>); | 938 Expect.equals(tIsDynamic, confuse(m21) is F21<bool>); |
964 } else { | 939 } else { |
965 if (inCheckedMode) { | 940 if (typeAssertionsEnabled) { |
966 Expect.throws(() { | 941 Expect.throws(() { |
967 x21 = (f21 as dynamic); | 942 x21 = (f21 as dynamic); |
968 }); | 943 }); |
969 Expect.throws(() { | 944 Expect.throws(() { |
970 x21 = confuse(f21); | 945 x21 = confuse(f21); |
971 }); | 946 }); |
972 core.List<core.int> Function<A>(List<T> x) Function<B extends core.int>( | 947 core.List<core.int> Function<A>(List<T> x) Function<B extends core.int>( |
973 int x) l21; | 948 int x) l21; |
974 Expect.throws(() { | 949 Expect.throws(() { |
975 l21 = (f21 as dynamic); | 950 l21 = (f21 as dynamic); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1034 x23 = confuse(m23); | 1009 x23 = confuse(m23); |
1035 l23 = confuse(m23); | 1010 l23 = confuse(m23); |
1036 if (!tIsBool) { | 1011 if (!tIsBool) { |
1037 Expect.isTrue(f23 is F23<int>); | 1012 Expect.isTrue(f23 is F23<int>); |
1038 Expect.isFalse(f23 is F23<bool>); | 1013 Expect.isFalse(f23 is F23<bool>); |
1039 Expect.isTrue(confuse(f23) is F23<int>); | 1014 Expect.isTrue(confuse(f23) is F23<int>); |
1040 Expect.isFalse(confuse(f23) is F23<bool>); | 1015 Expect.isFalse(confuse(f23) is F23<bool>); |
1041 Expect.equals(tIsDynamic, m23 is F23<bool>); | 1016 Expect.equals(tIsDynamic, m23 is F23<bool>); |
1042 Expect.equals(tIsDynamic, confuse(m23) is F23<bool>); | 1017 Expect.equals(tIsDynamic, confuse(m23) is F23<bool>); |
1043 } else { | 1018 } else { |
1044 if (inCheckedMode) { | 1019 if (typeAssertionsEnabled) { |
1045 Expect.throws(() { | 1020 Expect.throws(() { |
1046 x23 = (f23 as dynamic); | 1021 x23 = (f23 as dynamic); |
1047 }); | 1022 }); |
1048 Expect.throws(() { | 1023 Expect.throws(() { |
1049 x23 = confuse(f23); | 1024 x23 = confuse(f23); |
1050 }); | 1025 }); |
1051 B Function(List<T> x) Function<B extends core.int>(int x) l23; | 1026 B Function(List<T> x) Function<B extends core.int>(int x) l23; |
1052 Expect.throws(() { | 1027 Expect.throws(() { |
1053 l23 = (f23 as dynamic); | 1028 l23 = (f23 as dynamic); |
1054 }); | 1029 }); |
1055 Expect.throws(() { | 1030 Expect.throws(() { |
1056 l23 = confuse(f23); | 1031 l23 = confuse(f23); |
1057 }); | 1032 }); |
1058 } | 1033 } |
1059 B Function(List<T> x) Function<B extends core.int>(int x) l23 = m23; | 1034 B Function(List<T> x) Function<B extends core.int>(int x) l23 = m23; |
1060 // In checked mode, verifies the type. | 1035 // In checked mode, verifies the type. |
1061 x23 = m23; | 1036 x23 = m23; |
1062 x23 = confuse(m23); | 1037 x23 = confuse(m23); |
1063 } | 1038 } |
1064 } | 1039 } |
1065 } | 1040 } |
1066 | 1041 |
1067 void main() { | 1042 void main() { |
1068 new U47().runTests(); | 1043 new U47().runTests(); |
1069 new U47<int>(tIsInt: true).runTests(); | 1044 new U47<int>(tIsInt: true).runTests(); |
1070 new U47<bool>(tIsBool: true).runTests(); | 1045 new U47<bool>(tIsBool: true).runTests(); |
1071 } | 1046 } |
OLD | NEW |