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([Function x1]); |
23 bool result = false; | 23 typedef F1<T> = List<Function> Function(int x0); |
24 assert(result = true); | 24 typedef F2<T> = core.List<core.int> Function(List<T> x0); |
25 return result; | 25 typedef F3<T> = Function(int y, [core.List<core.int> x]); |
26 })(); | 26 typedef F4<T> = core.List<core.int> Function<A>(int x); |
27 | 27 typedef F5<T> = int Function(int x0, [Function x]) Function(); |
28 typedef F0<T> | 28 typedef F6<T> = int Function([core.List<core.int> x1]) Function(); |
29 = int Function([Function x1]); | 29 typedef F7<T> = Function Function(int x, [int x2]) Function(); |
30 typedef F1<T> | 30 typedef F8<T> = Function Function(int y, {List<Function> x}) Function(); |
31 = List<Function> Function(int x0); | 31 typedef F9<T> = List<Function> Function([int x]) Function(); |
32 typedef F2<T> | 32 typedef F10<T> = List<Function> Function(List<Function> x0) Function(); |
33 = core.List<core.int> Function(List<T> x0); | 33 typedef F11<T> = List<Function> Function(int x, [List<T> x2]) Function(); |
34 typedef F3<T> | 34 typedef F12<T> = core.List<core.int> Function(int x0, {Function x}) Function(); |
35 = Function(int y, [core.List<core.int> x]); | 35 typedef F13<T> = core.List<core.int> Function([List<T> x]) Function(); |
36 typedef F4<T> | 36 typedef F14<T> = List<T> Function(int y, [Function x]) Function(); |
37 = core.List<core.int> Function<A>(int x); | 37 typedef F15<T> = List<T> Function(int x1, [core.List<core.int> x2]) Function(); |
38 typedef F5<T> | 38 typedef F16<T> = Function({int x}) Function(); |
39 = int Function(int x0, [Function x]) Function(); | 39 typedef F17<T> = Function(core.List<core.int> x) Function(); |
40 typedef F6<T> | 40 typedef F18<T> = void Function(int x0, [int x]) Function(); |
41 = int Function([core.List<core.int> x1]) Function(); | 41 typedef F19<T> = void Function([List<Function> x1]) Function(); |
42 typedef F7<T> | 42 typedef F20<T> = void Function({List<T> x}) Function(); |
43 = Function Function(int x, [int x2]) Function(); | 43 typedef F21<T> = List<Function> Function<A>() Function(); |
44 typedef F8<T> | 44 typedef F22<T> = Function<A>(A x) Function(); |
45 = Function Function(int y, {List<Function> x}) Function(); | 45 typedef F23<T> = void Function<A>(List<A> x) Function(); |
46 typedef F9<T> | |
47 = List<Function> Function([int x]) Function(); | |
48 typedef F10<T> | |
49 = List<Function> Function(List<Function> x0) Function(); | |
50 typedef F11<T> | |
51 = List<Function> Function(int x, [List<T> x2]) Function(); | |
52 typedef F12<T> | |
53 = core.List<core.int> Function(int x0, {Function x}) Function(); | |
54 typedef F13<T> | |
55 = core.List<core.int> Function([List<T> x]) Function(); | |
56 typedef F14<T> | |
57 = List<T> Function(int y, [Function x]) Function(); | |
58 typedef F15<T> | |
59 = List<T> Function(int x1, [core.List<core.int> x2]) Function(); | |
60 typedef F16<T> | |
61 = Function({int x}) Function(); | |
62 typedef F17<T> | |
63 = Function(core.List<core.int> x) Function(); | |
64 typedef F18<T> | |
65 = void Function(int x0, [int x]) Function(); | |
66 typedef F19<T> | |
67 = void Function([List<Function> x1]) Function(); | |
68 typedef F20<T> | |
69 = void Function({List<T> x}) Function(); | |
70 typedef F21<T> | |
71 = List<Function> Function<A>() Function(); | |
72 typedef F22<T> | |
73 = Function<A>(A x) Function(); | |
74 typedef F23<T> | |
75 = void Function<A>(List<A> x) Function(); | |
76 | 46 |
77 int f0([Function x0]) => null; | 47 int f0([Function x0]) => null; |
78 List<Function> f1(int x0) => null; | 48 List<Function> f1(int x0) => null; |
79 core.List<core.int> f2(List<int> x0) => null; | 49 core.List<core.int> f2(List<int> x0) => null; |
80 f3(int y, [core.List<core.int> x]) => null; | 50 f3(int y, [core.List<core.int> x]) => null; |
81 core.List<core.int> f4<A>(int x) => null; | 51 core.List<core.int> f4<A>(int x) => null; |
82 int Function(int x0, [Function x]) f5() => null; | 52 int Function(int x0, [Function x]) f5() => null; |
83 int Function([core.List<core.int> x0]) f6() => null; | 53 int Function([core.List<core.int> x0]) f6() => null; |
84 Function Function(int x, [int x0]) f7() => null; | 54 Function Function(int x, [int x0]) f7() => null; |
85 Function Function(int y, {List<Function> x}) f8() => null; | 55 Function Function(int y, {List<Function> x}) f8() => null; |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 x2 = confuse(m2); | 225 x2 = confuse(m2); |
256 l2 = confuse(m2); | 226 l2 = confuse(m2); |
257 if (!tIsBool) { | 227 if (!tIsBool) { |
258 Expect.isTrue(f2 is F2<int>); | 228 Expect.isTrue(f2 is F2<int>); |
259 Expect.isFalse(f2 is F2<bool>); | 229 Expect.isFalse(f2 is F2<bool>); |
260 Expect.isTrue(confuse(f2) is F2<int>); | 230 Expect.isTrue(confuse(f2) is F2<int>); |
261 Expect.isFalse(confuse(f2) is F2<bool>); | 231 Expect.isFalse(confuse(f2) is F2<bool>); |
262 Expect.equals(tIsDynamic, m2 is F2<bool>); | 232 Expect.equals(tIsDynamic, m2 is F2<bool>); |
263 Expect.equals(tIsDynamic, confuse(m2) is F2<bool>); | 233 Expect.equals(tIsDynamic, confuse(m2) is F2<bool>); |
264 } else { | 234 } else { |
265 if (inCheckedMode) { | 235 if (typeAssertionsEnabled) { |
266 Expect.throws(() { | 236 Expect.throws(() { |
267 x2 = (f2 as dynamic); | 237 x2 = (f2 as dynamic); |
268 }); | 238 }); |
269 Expect.throws(() { | 239 Expect.throws(() { |
270 x2 = confuse(f2); | 240 x2 = confuse(f2); |
271 }); | 241 }); |
272 core.List<core.int> Function(List<T> x0) l2; | 242 core.List<core.int> Function(List<T> x0) l2; |
273 Expect.throws(() { | 243 Expect.throws(() { |
274 l2 = (f2 as dynamic); | 244 l2 = (f2 as dynamic); |
275 }); | 245 }); |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 x11 = confuse(m11); | 471 x11 = confuse(m11); |
502 l11 = confuse(m11); | 472 l11 = confuse(m11); |
503 if (!tIsBool) { | 473 if (!tIsBool) { |
504 Expect.isTrue(f11 is F11<int>); | 474 Expect.isTrue(f11 is F11<int>); |
505 Expect.isFalse(f11 is F11<bool>); | 475 Expect.isFalse(f11 is F11<bool>); |
506 Expect.isTrue(confuse(f11) is F11<int>); | 476 Expect.isTrue(confuse(f11) is F11<int>); |
507 Expect.isFalse(confuse(f11) is F11<bool>); | 477 Expect.isFalse(confuse(f11) is F11<bool>); |
508 Expect.equals(tIsDynamic, m11 is F11<bool>); | 478 Expect.equals(tIsDynamic, m11 is F11<bool>); |
509 Expect.equals(tIsDynamic, confuse(m11) is F11<bool>); | 479 Expect.equals(tIsDynamic, confuse(m11) is F11<bool>); |
510 } else { | 480 } else { |
511 if (inCheckedMode) { | 481 if (typeAssertionsEnabled) { |
512 Expect.throws(() { | 482 Expect.throws(() { |
513 x11 = (f11 as dynamic); | 483 x11 = (f11 as dynamic); |
514 }); | 484 }); |
515 Expect.throws(() { | 485 Expect.throws(() { |
516 x11 = confuse(f11); | 486 x11 = confuse(f11); |
517 }); | 487 }); |
518 List<Function> Function(int x, [List<T> x2]) Function() l11; | 488 List<Function> Function(int x, [List<T> x2]) Function() l11; |
519 Expect.throws(() { | 489 Expect.throws(() { |
520 l11 = (f11 as dynamic); | 490 l11 = (f11 as dynamic); |
521 }); | 491 }); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
578 x13 = confuse(m13); | 548 x13 = confuse(m13); |
579 l13 = confuse(m13); | 549 l13 = confuse(m13); |
580 if (!tIsBool) { | 550 if (!tIsBool) { |
581 Expect.isTrue(f13 is F13<int>); | 551 Expect.isTrue(f13 is F13<int>); |
582 Expect.isFalse(f13 is F13<bool>); | 552 Expect.isFalse(f13 is F13<bool>); |
583 Expect.isTrue(confuse(f13) is F13<int>); | 553 Expect.isTrue(confuse(f13) is F13<int>); |
584 Expect.isFalse(confuse(f13) is F13<bool>); | 554 Expect.isFalse(confuse(f13) is F13<bool>); |
585 Expect.equals(tIsDynamic, m13 is F13<bool>); | 555 Expect.equals(tIsDynamic, m13 is F13<bool>); |
586 Expect.equals(tIsDynamic, confuse(m13) is F13<bool>); | 556 Expect.equals(tIsDynamic, confuse(m13) is F13<bool>); |
587 } else { | 557 } else { |
588 if (inCheckedMode) { | 558 if (typeAssertionsEnabled) { |
589 Expect.throws(() { | 559 Expect.throws(() { |
590 x13 = (f13 as dynamic); | 560 x13 = (f13 as dynamic); |
591 }); | 561 }); |
592 Expect.throws(() { | 562 Expect.throws(() { |
593 x13 = confuse(f13); | 563 x13 = confuse(f13); |
594 }); | 564 }); |
595 core.List<core.int> Function([List<T> x]) Function() l13; | 565 core.List<core.int> Function([List<T> x]) Function() l13; |
596 Expect.throws(() { | 566 Expect.throws(() { |
597 l13 = (f13 as dynamic); | 567 l13 = (f13 as dynamic); |
598 }); | 568 }); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 x14 = confuse(m14); | 600 x14 = confuse(m14); |
631 l14 = confuse(m14); | 601 l14 = confuse(m14); |
632 if (!tIsBool) { | 602 if (!tIsBool) { |
633 Expect.isTrue(f14 is F14<int>); | 603 Expect.isTrue(f14 is F14<int>); |
634 Expect.isFalse(f14 is F14<bool>); | 604 Expect.isFalse(f14 is F14<bool>); |
635 Expect.isTrue(confuse(f14) is F14<int>); | 605 Expect.isTrue(confuse(f14) is F14<int>); |
636 Expect.isFalse(confuse(f14) is F14<bool>); | 606 Expect.isFalse(confuse(f14) is F14<bool>); |
637 Expect.equals(tIsDynamic, m14 is F14<bool>); | 607 Expect.equals(tIsDynamic, m14 is F14<bool>); |
638 Expect.equals(tIsDynamic, confuse(m14) is F14<bool>); | 608 Expect.equals(tIsDynamic, confuse(m14) is F14<bool>); |
639 } else { | 609 } else { |
640 if (inCheckedMode) { | 610 if (typeAssertionsEnabled) { |
641 Expect.throws(() { | 611 Expect.throws(() { |
642 x14 = (f14 as dynamic); | 612 x14 = (f14 as dynamic); |
643 }); | 613 }); |
644 Expect.throws(() { | 614 Expect.throws(() { |
645 x14 = confuse(f14); | 615 x14 = confuse(f14); |
646 }); | 616 }); |
647 List<T> Function(int y, [Function x]) Function() l14; | 617 List<T> Function(int y, [Function x]) Function() l14; |
648 Expect.throws(() { | 618 Expect.throws(() { |
649 l14 = (f14 as dynamic); | 619 l14 = (f14 as dynamic); |
650 }); | 620 }); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
683 x15 = confuse(m15); | 653 x15 = confuse(m15); |
684 l15 = confuse(m15); | 654 l15 = confuse(m15); |
685 if (!tIsBool) { | 655 if (!tIsBool) { |
686 Expect.isTrue(f15 is F15<int>); | 656 Expect.isTrue(f15 is F15<int>); |
687 Expect.isFalse(f15 is F15<bool>); | 657 Expect.isFalse(f15 is F15<bool>); |
688 Expect.isTrue(confuse(f15) is F15<int>); | 658 Expect.isTrue(confuse(f15) is F15<int>); |
689 Expect.isFalse(confuse(f15) is F15<bool>); | 659 Expect.isFalse(confuse(f15) is F15<bool>); |
690 Expect.equals(tIsDynamic, m15 is F15<bool>); | 660 Expect.equals(tIsDynamic, m15 is F15<bool>); |
691 Expect.equals(tIsDynamic, confuse(m15) is F15<bool>); | 661 Expect.equals(tIsDynamic, confuse(m15) is F15<bool>); |
692 } else { | 662 } else { |
693 if (inCheckedMode) { | 663 if (typeAssertionsEnabled) { |
694 Expect.throws(() { | 664 Expect.throws(() { |
695 x15 = (f15 as dynamic); | 665 x15 = (f15 as dynamic); |
696 }); | 666 }); |
697 Expect.throws(() { | 667 Expect.throws(() { |
698 x15 = confuse(f15); | 668 x15 = confuse(f15); |
699 }); | 669 }); |
700 List<T> Function(int x1, [core.List<core.int> x2]) Function() l15; | 670 List<T> Function(int x1, [core.List<core.int> x2]) Function() l15; |
701 Expect.throws(() { | 671 Expect.throws(() { |
702 l15 = (f15 as dynamic); | 672 l15 = (f15 as dynamic); |
703 }); | 673 }); |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
831 x20 = confuse(m20); | 801 x20 = confuse(m20); |
832 l20 = confuse(m20); | 802 l20 = confuse(m20); |
833 if (!tIsBool) { | 803 if (!tIsBool) { |
834 Expect.isTrue(f20 is F20<int>); | 804 Expect.isTrue(f20 is F20<int>); |
835 Expect.isFalse(f20 is F20<bool>); | 805 Expect.isFalse(f20 is F20<bool>); |
836 Expect.isTrue(confuse(f20) is F20<int>); | 806 Expect.isTrue(confuse(f20) is F20<int>); |
837 Expect.isFalse(confuse(f20) is F20<bool>); | 807 Expect.isFalse(confuse(f20) is F20<bool>); |
838 Expect.equals(tIsDynamic, m20 is F20<bool>); | 808 Expect.equals(tIsDynamic, m20 is F20<bool>); |
839 Expect.equals(tIsDynamic, confuse(m20) is F20<bool>); | 809 Expect.equals(tIsDynamic, confuse(m20) is F20<bool>); |
840 } else { | 810 } else { |
841 if (inCheckedMode) { | 811 if (typeAssertionsEnabled) { |
842 Expect.throws(() { | 812 Expect.throws(() { |
843 x20 = (f20 as dynamic); | 813 x20 = (f20 as dynamic); |
844 }); | 814 }); |
845 Expect.throws(() { | 815 Expect.throws(() { |
846 x20 = confuse(f20); | 816 x20 = confuse(f20); |
847 }); | 817 }); |
848 void Function({List<T> x}) Function() l20; | 818 void Function({List<T> x}) Function() l20; |
849 Expect.throws(() { | 819 Expect.throws(() { |
850 l20 = (f20 as dynamic); | 820 l20 = (f20 as dynamic); |
851 }); | 821 }); |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
931 x23 = confuse(m23); | 901 x23 = confuse(m23); |
932 l23 = confuse(m23); | 902 l23 = confuse(m23); |
933 } | 903 } |
934 } | 904 } |
935 | 905 |
936 void main() { | 906 void main() { |
937 new U16().runTests(); | 907 new U16().runTests(); |
938 new U16<int>(tIsInt: true).runTests(); | 908 new U16<int>(tIsInt: true).runTests(); |
939 new U16<bool>(tIsBool: true).runTests(); | 909 new U16<bool>(tIsBool: true).runTests(); |
940 } | 910 } |
OLD | NEW |