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