| 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(int x0); |
| 23 bool result = false; | 23 typedef F1<T> = List<Function> Function(List<T> x0); |
| 24 assert(result = true); | 24 typedef F2<T> = List<T> Function(int y, [core.List<core.int> x]); |
| 25 return result; | 25 typedef F3<T> = void Function(int x0, [List<Function> x]); |
| 26 })(); | 26 typedef F4<T> = void Function<A>(List<T> x); |
| 27 | 27 typedef F5<T> = int Function(int x0, [List<Function> x]) Function(); |
| 28 typedef F0<T> | 28 typedef F6<T> = int Function([List<T> x1]) Function(); |
| 29 = Function Function(int x0); | 29 typedef F7<T> = Function Function(int x, [Function x2]) Function(); |
| 30 typedef F1<T> | 30 typedef F8<T> = Function Function(int y, {core.List<core.int> x}) Function(); |
| 31 = List<Function> Function(List<T> x0); | 31 typedef F9<T> = List<Function> Function([Function x]) Function(); |
| 32 typedef F2<T> | 32 typedef F10<T> = List<Function> Function(core.List<core.int> x0) Function(); |
| 33 = List<T> Function(int y, [core.List<core.int> x]); | 33 typedef F11<T> = core.List<core.int> Function(int x1, [int x2]) Function(); |
| 34 typedef F3<T> | 34 typedef F12<T> = core.List<core.int> Function(int x0, {List<Function> x}) |
| 35 = void Function(int x0, [List<Function> x]); | 35 Function(); |
| 36 typedef F4<T> | 36 typedef F13<T> = List<T> Function(int x) Function(); |
| 37 = void Function<A>(List<T> x); | 37 typedef F14<T> = List<T> Function(int y, [List<Function> x]) Function(); |
| 38 typedef F5<T> | 38 typedef F15<T> = List<T> Function(int x1, [List<T> x2]) Function(); |
| 39 = int Function(int x0, [List<Function> x]) Function(); | 39 typedef F16<T> = Function({Function x}) Function(); |
| 40 typedef F6<T> | 40 typedef F17<T> = Function(List<T> x) Function(); |
| 41 = int Function([List<T> x1]) Function(); | 41 typedef F18<T> = void Function(int x0, [Function x]) Function(); |
| 42 typedef F7<T> | 42 typedef F19<T> = void Function([core.List<core.int> x1]) Function(); |
| 43 = Function Function(int x, [Function x2]) Function(); | 43 typedef F20<T> = int Function<A>(List<A> x) Function(); |
| 44 typedef F8<T> | 44 typedef F21<T> = List<T> Function<A>(int x) Function(); |
| 45 = Function Function(int y, {core.List<core.int> x}) Function(); | 45 typedef F22<T> = List<A> Function<A>(Function x) Function(); |
| 46 typedef F9<T> | |
| 47 = List<Function> Function([Function x]) Function(); | |
| 48 typedef F10<T> | |
| 49 = List<Function> Function(core.List<core.int> x0) Function(); | |
| 50 typedef F11<T> | |
| 51 = core.List<core.int> Function(int x1, [int x2]) Function(); | |
| 52 typedef F12<T> | |
| 53 = core.List<core.int> Function(int x0, {List<Function> x}) Function(); | |
| 54 typedef F13<T> | |
| 55 = List<T> Function(int x) Function(); | |
| 56 typedef F14<T> | |
| 57 = List<T> Function(int y, [List<Function> x]) Function(); | |
| 58 typedef F15<T> | |
| 59 = List<T> Function(int x1, [List<T> x2]) Function(); | |
| 60 typedef F16<T> | |
| 61 = Function({Function x}) Function(); | |
| 62 typedef F17<T> | |
| 63 = Function(List<T> x) Function(); | |
| 64 typedef F18<T> | |
| 65 = void Function(int x0, [Function x]) Function(); | |
| 66 typedef F19<T> | |
| 67 = void Function([core.List<core.int> x1]) Function(); | |
| 68 typedef F20<T> | |
| 69 = int Function<A>(List<A> x) Function(); | |
| 70 typedef F21<T> | |
| 71 = List<T> Function<A>(int x) Function(); | |
| 72 typedef F22<T> | |
| 73 = List<A> Function<A>(Function x) Function(); | |
| 74 | 46 |
| 75 Function f0(int x0) => null; | 47 Function f0(int x0) => null; |
| 76 List<Function> f1(List<int> x0) => null; | 48 List<Function> f1(List<int> x0) => null; |
| 77 List<int> f2(int y, [core.List<core.int> x]) => null; | 49 List<int> f2(int y, [core.List<core.int> x]) => null; |
| 78 void f3(int x0, [List<Function> x]) => null; | 50 void f3(int x0, [List<Function> x]) => null; |
| 79 void f4<A>(List<int> x) => null; | 51 void f4<A>(List<int> x) => null; |
| 80 int Function(int x0, [List<Function> x]) f5() => null; | 52 int Function(int x0, [List<Function> x]) f5() => null; |
| 81 int Function([List<int> x0]) f6() => null; | 53 int Function([List<int> x0]) f6() => null; |
| 82 Function Function(int x, [Function x0]) f7() => null; | 54 Function Function(int x, [Function x0]) f7() => null; |
| 83 Function Function(int y, {core.List<core.int> x}) f8() => null; | 55 Function Function(int y, {core.List<core.int> x}) f8() => null; |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 x1 = confuse(m1); | 197 x1 = confuse(m1); |
| 226 l1 = confuse(m1); | 198 l1 = confuse(m1); |
| 227 if (!tIsBool) { | 199 if (!tIsBool) { |
| 228 Expect.isTrue(f1 is F1<int>); | 200 Expect.isTrue(f1 is F1<int>); |
| 229 Expect.isFalse(f1 is F1<bool>); | 201 Expect.isFalse(f1 is F1<bool>); |
| 230 Expect.isTrue(confuse(f1) is F1<int>); | 202 Expect.isTrue(confuse(f1) is F1<int>); |
| 231 Expect.isFalse(confuse(f1) is F1<bool>); | 203 Expect.isFalse(confuse(f1) is F1<bool>); |
| 232 Expect.equals(tIsDynamic, m1 is F1<bool>); | 204 Expect.equals(tIsDynamic, m1 is F1<bool>); |
| 233 Expect.equals(tIsDynamic, confuse(m1) is F1<bool>); | 205 Expect.equals(tIsDynamic, confuse(m1) is F1<bool>); |
| 234 } else { | 206 } else { |
| 235 if (inCheckedMode) { | 207 if (typeAssertionsEnabled) { |
| 236 Expect.throws(() { | 208 Expect.throws(() { |
| 237 x1 = (f1 as dynamic); | 209 x1 = (f1 as dynamic); |
| 238 }); | 210 }); |
| 239 Expect.throws(() { | 211 Expect.throws(() { |
| 240 x1 = confuse(f1); | 212 x1 = confuse(f1); |
| 241 }); | 213 }); |
| 242 List<Function> Function(List<T> x0) l1; | 214 List<Function> Function(List<T> x0) l1; |
| 243 Expect.throws(() { | 215 Expect.throws(() { |
| 244 l1 = (f1 as dynamic); | 216 l1 = (f1 as dynamic); |
| 245 }); | 217 }); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 x2 = confuse(m2); | 249 x2 = confuse(m2); |
| 278 l2 = confuse(m2); | 250 l2 = confuse(m2); |
| 279 if (!tIsBool) { | 251 if (!tIsBool) { |
| 280 Expect.isTrue(f2 is F2<int>); | 252 Expect.isTrue(f2 is F2<int>); |
| 281 Expect.isFalse(f2 is F2<bool>); | 253 Expect.isFalse(f2 is F2<bool>); |
| 282 Expect.isTrue(confuse(f2) is F2<int>); | 254 Expect.isTrue(confuse(f2) is F2<int>); |
| 283 Expect.isFalse(confuse(f2) is F2<bool>); | 255 Expect.isFalse(confuse(f2) is F2<bool>); |
| 284 Expect.equals(tIsDynamic, m2 is F2<bool>); | 256 Expect.equals(tIsDynamic, m2 is F2<bool>); |
| 285 Expect.equals(tIsDynamic, confuse(m2) is F2<bool>); | 257 Expect.equals(tIsDynamic, confuse(m2) is F2<bool>); |
| 286 } else { | 258 } else { |
| 287 if (inCheckedMode) { | 259 if (typeAssertionsEnabled) { |
| 288 Expect.throws(() { | 260 Expect.throws(() { |
| 289 x2 = (f2 as dynamic); | 261 x2 = (f2 as dynamic); |
| 290 }); | 262 }); |
| 291 Expect.throws(() { | 263 Expect.throws(() { |
| 292 x2 = confuse(f2); | 264 x2 = confuse(f2); |
| 293 }); | 265 }); |
| 294 List<T> Function(int y, [core.List<core.int> x]) l2; | 266 List<T> Function(int y, [core.List<core.int> x]) l2; |
| 295 Expect.throws(() { | 267 Expect.throws(() { |
| 296 l2 = (f2 as dynamic); | 268 l2 = (f2 as dynamic); |
| 297 }); | 269 }); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 x4 = confuse(m4); | 325 x4 = confuse(m4); |
| 354 l4 = confuse(m4); | 326 l4 = confuse(m4); |
| 355 if (!tIsBool) { | 327 if (!tIsBool) { |
| 356 Expect.isTrue(f4 is F4<int>); | 328 Expect.isTrue(f4 is F4<int>); |
| 357 Expect.isFalse(f4 is F4<bool>); | 329 Expect.isFalse(f4 is F4<bool>); |
| 358 Expect.isTrue(confuse(f4) is F4<int>); | 330 Expect.isTrue(confuse(f4) is F4<int>); |
| 359 Expect.isFalse(confuse(f4) is F4<bool>); | 331 Expect.isFalse(confuse(f4) is F4<bool>); |
| 360 Expect.equals(tIsDynamic, m4 is F4<bool>); | 332 Expect.equals(tIsDynamic, m4 is F4<bool>); |
| 361 Expect.equals(tIsDynamic, confuse(m4) is F4<bool>); | 333 Expect.equals(tIsDynamic, confuse(m4) is F4<bool>); |
| 362 } else { | 334 } else { |
| 363 if (inCheckedMode) { | 335 if (typeAssertionsEnabled) { |
| 364 Expect.throws(() { | 336 Expect.throws(() { |
| 365 x4 = (f4 as dynamic); | 337 x4 = (f4 as dynamic); |
| 366 }); | 338 }); |
| 367 Expect.throws(() { | 339 Expect.throws(() { |
| 368 x4 = confuse(f4); | 340 x4 = confuse(f4); |
| 369 }); | 341 }); |
| 370 void Function<A>(List<T> x) l4; | 342 void Function<A>(List<T> x) l4; |
| 371 Expect.throws(() { | 343 Expect.throws(() { |
| 372 l4 = (f4 as dynamic); | 344 l4 = (f4 as dynamic); |
| 373 }); | 345 }); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 x6 = confuse(m6); | 401 x6 = confuse(m6); |
| 430 l6 = confuse(m6); | 402 l6 = confuse(m6); |
| 431 if (!tIsBool) { | 403 if (!tIsBool) { |
| 432 Expect.isTrue(f6 is F6<int>); | 404 Expect.isTrue(f6 is F6<int>); |
| 433 Expect.isFalse(f6 is F6<bool>); | 405 Expect.isFalse(f6 is F6<bool>); |
| 434 Expect.isTrue(confuse(f6) is F6<int>); | 406 Expect.isTrue(confuse(f6) is F6<int>); |
| 435 Expect.isFalse(confuse(f6) is F6<bool>); | 407 Expect.isFalse(confuse(f6) is F6<bool>); |
| 436 Expect.equals(tIsDynamic, m6 is F6<bool>); | 408 Expect.equals(tIsDynamic, m6 is F6<bool>); |
| 437 Expect.equals(tIsDynamic, confuse(m6) is F6<bool>); | 409 Expect.equals(tIsDynamic, confuse(m6) is F6<bool>); |
| 438 } else { | 410 } else { |
| 439 if (inCheckedMode) { | 411 if (typeAssertionsEnabled) { |
| 440 Expect.throws(() { | 412 Expect.throws(() { |
| 441 x6 = (f6 as dynamic); | 413 x6 = (f6 as dynamic); |
| 442 }); | 414 }); |
| 443 Expect.throws(() { | 415 Expect.throws(() { |
| 444 x6 = confuse(f6); | 416 x6 = confuse(f6); |
| 445 }); | 417 }); |
| 446 int Function([List<T> x1]) Function() l6; | 418 int Function([List<T> x1]) Function() l6; |
| 447 Expect.throws(() { | 419 Expect.throws(() { |
| 448 l6 = (f6 as dynamic); | 420 l6 = (f6 as dynamic); |
| 449 }); | 421 }); |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 core.List<core.int> Function(int x0, {List<Function> x}) Function() l12; | 561 core.List<core.int> Function(int x0, {List<Function> x}) Function() l12; |
| 590 // The static function f12 sets `T` to `int`. | 562 // The static function f12 sets `T` to `int`. |
| 591 if (!tIsBool) { | 563 if (!tIsBool) { |
| 592 x12 = f12 as dynamic; | 564 x12 = f12 as dynamic; |
| 593 l12 = f12 as dynamic; | 565 l12 = f12 as dynamic; |
| 594 x12 = confuse(f12); | 566 x12 = confuse(f12); |
| 595 l12 = confuse(f12); | 567 l12 = confuse(f12); |
| 596 } | 568 } |
| 597 | 569 |
| 598 Expect.isTrue(m12 is F12); | 570 Expect.isTrue(m12 is F12); |
| 599 Expect.isTrue(m12 is core.List<core.int> Function(int x0, | 571 Expect.isTrue(m12 |
| 600 {List<Function> x}) Function()); | 572 is core.List<core.int> Function(int x0, {List<Function> x}) Function()); |
| 601 Expect.isTrue(confuse(m12) is F12); | 573 Expect.isTrue(confuse(m12) is F12); |
| 602 // In checked mode, verifies the type. | 574 // In checked mode, verifies the type. |
| 603 x12 = m12; | 575 x12 = m12; |
| 604 l12 = m12; | 576 l12 = m12; |
| 605 x12 = confuse(m12); | 577 x12 = confuse(m12); |
| 606 l12 = confuse(m12); | 578 l12 = confuse(m12); |
| 607 } | 579 } |
| 608 | 580 |
| 609 /// List<T> Function(int x) Function() | 581 /// List<T> Function(int x) Function() |
| 610 void testF13() { | 582 void testF13() { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 629 x13 = confuse(m13); | 601 x13 = confuse(m13); |
| 630 l13 = confuse(m13); | 602 l13 = confuse(m13); |
| 631 if (!tIsBool) { | 603 if (!tIsBool) { |
| 632 Expect.isTrue(f13 is F13<int>); | 604 Expect.isTrue(f13 is F13<int>); |
| 633 Expect.isFalse(f13 is F13<bool>); | 605 Expect.isFalse(f13 is F13<bool>); |
| 634 Expect.isTrue(confuse(f13) is F13<int>); | 606 Expect.isTrue(confuse(f13) is F13<int>); |
| 635 Expect.isFalse(confuse(f13) is F13<bool>); | 607 Expect.isFalse(confuse(f13) is F13<bool>); |
| 636 Expect.equals(tIsDynamic, m13 is F13<bool>); | 608 Expect.equals(tIsDynamic, m13 is F13<bool>); |
| 637 Expect.equals(tIsDynamic, confuse(m13) is F13<bool>); | 609 Expect.equals(tIsDynamic, confuse(m13) is F13<bool>); |
| 638 } else { | 610 } else { |
| 639 if (inCheckedMode) { | 611 if (typeAssertionsEnabled) { |
| 640 Expect.throws(() { | 612 Expect.throws(() { |
| 641 x13 = (f13 as dynamic); | 613 x13 = (f13 as dynamic); |
| 642 }); | 614 }); |
| 643 Expect.throws(() { | 615 Expect.throws(() { |
| 644 x13 = confuse(f13); | 616 x13 = confuse(f13); |
| 645 }); | 617 }); |
| 646 List<T> Function(int x) Function() l13; | 618 List<T> Function(int x) Function() l13; |
| 647 Expect.throws(() { | 619 Expect.throws(() { |
| 648 l13 = (f13 as dynamic); | 620 l13 = (f13 as dynamic); |
| 649 }); | 621 }); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 682 x14 = confuse(m14); | 654 x14 = confuse(m14); |
| 683 l14 = confuse(m14); | 655 l14 = confuse(m14); |
| 684 if (!tIsBool) { | 656 if (!tIsBool) { |
| 685 Expect.isTrue(f14 is F14<int>); | 657 Expect.isTrue(f14 is F14<int>); |
| 686 Expect.isFalse(f14 is F14<bool>); | 658 Expect.isFalse(f14 is F14<bool>); |
| 687 Expect.isTrue(confuse(f14) is F14<int>); | 659 Expect.isTrue(confuse(f14) is F14<int>); |
| 688 Expect.isFalse(confuse(f14) is F14<bool>); | 660 Expect.isFalse(confuse(f14) is F14<bool>); |
| 689 Expect.equals(tIsDynamic, m14 is F14<bool>); | 661 Expect.equals(tIsDynamic, m14 is F14<bool>); |
| 690 Expect.equals(tIsDynamic, confuse(m14) is F14<bool>); | 662 Expect.equals(tIsDynamic, confuse(m14) is F14<bool>); |
| 691 } else { | 663 } else { |
| 692 if (inCheckedMode) { | 664 if (typeAssertionsEnabled) { |
| 693 Expect.throws(() { | 665 Expect.throws(() { |
| 694 x14 = (f14 as dynamic); | 666 x14 = (f14 as dynamic); |
| 695 }); | 667 }); |
| 696 Expect.throws(() { | 668 Expect.throws(() { |
| 697 x14 = confuse(f14); | 669 x14 = confuse(f14); |
| 698 }); | 670 }); |
| 699 List<T> Function(int y, [List<Function> x]) Function() l14; | 671 List<T> Function(int y, [List<Function> x]) Function() l14; |
| 700 Expect.throws(() { | 672 Expect.throws(() { |
| 701 l14 = (f14 as dynamic); | 673 l14 = (f14 as dynamic); |
| 702 }); | 674 }); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 734 x15 = confuse(m15); | 706 x15 = confuse(m15); |
| 735 l15 = confuse(m15); | 707 l15 = confuse(m15); |
| 736 if (!tIsBool) { | 708 if (!tIsBool) { |
| 737 Expect.isTrue(f15 is F15<int>); | 709 Expect.isTrue(f15 is F15<int>); |
| 738 Expect.isFalse(f15 is F15<bool>); | 710 Expect.isFalse(f15 is F15<bool>); |
| 739 Expect.isTrue(confuse(f15) is F15<int>); | 711 Expect.isTrue(confuse(f15) is F15<int>); |
| 740 Expect.isFalse(confuse(f15) is F15<bool>); | 712 Expect.isFalse(confuse(f15) is F15<bool>); |
| 741 Expect.equals(tIsDynamic, m15 is F15<bool>); | 713 Expect.equals(tIsDynamic, m15 is F15<bool>); |
| 742 Expect.equals(tIsDynamic, confuse(m15) is F15<bool>); | 714 Expect.equals(tIsDynamic, confuse(m15) is F15<bool>); |
| 743 } else { | 715 } else { |
| 744 if (inCheckedMode) { | 716 if (typeAssertionsEnabled) { |
| 745 Expect.throws(() { | 717 Expect.throws(() { |
| 746 x15 = (f15 as dynamic); | 718 x15 = (f15 as dynamic); |
| 747 }); | 719 }); |
| 748 Expect.throws(() { | 720 Expect.throws(() { |
| 749 x15 = confuse(f15); | 721 x15 = confuse(f15); |
| 750 }); | 722 }); |
| 751 List<T> Function(int x1, [List<T> x2]) Function() l15; | 723 List<T> Function(int x1, [List<T> x2]) Function() l15; |
| 752 Expect.throws(() { | 724 Expect.throws(() { |
| 753 l15 = (f15 as dynamic); | 725 l15 = (f15 as dynamic); |
| 754 }); | 726 }); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 810 x17 = confuse(m17); | 782 x17 = confuse(m17); |
| 811 l17 = confuse(m17); | 783 l17 = confuse(m17); |
| 812 if (!tIsBool) { | 784 if (!tIsBool) { |
| 813 Expect.isTrue(f17 is F17<int>); | 785 Expect.isTrue(f17 is F17<int>); |
| 814 Expect.isFalse(f17 is F17<bool>); | 786 Expect.isFalse(f17 is F17<bool>); |
| 815 Expect.isTrue(confuse(f17) is F17<int>); | 787 Expect.isTrue(confuse(f17) is F17<int>); |
| 816 Expect.isFalse(confuse(f17) is F17<bool>); | 788 Expect.isFalse(confuse(f17) is F17<bool>); |
| 817 Expect.equals(tIsDynamic, m17 is F17<bool>); | 789 Expect.equals(tIsDynamic, m17 is F17<bool>); |
| 818 Expect.equals(tIsDynamic, confuse(m17) is F17<bool>); | 790 Expect.equals(tIsDynamic, confuse(m17) is F17<bool>); |
| 819 } else { | 791 } else { |
| 820 if (inCheckedMode) { | 792 if (typeAssertionsEnabled) { |
| 821 Expect.throws(() { | 793 Expect.throws(() { |
| 822 x17 = (f17 as dynamic); | 794 x17 = (f17 as dynamic); |
| 823 }); | 795 }); |
| 824 Expect.throws(() { | 796 Expect.throws(() { |
| 825 x17 = confuse(f17); | 797 x17 = confuse(f17); |
| 826 }); | 798 }); |
| 827 Function(List<T> x) Function() l17; | 799 Function(List<T> x) Function() l17; |
| 828 Expect.throws(() { | 800 Expect.throws(() { |
| 829 l17 = (f17 as dynamic); | 801 l17 = (f17 as dynamic); |
| 830 }); | 802 }); |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 934 x21 = confuse(m21); | 906 x21 = confuse(m21); |
| 935 l21 = confuse(m21); | 907 l21 = confuse(m21); |
| 936 if (!tIsBool) { | 908 if (!tIsBool) { |
| 937 Expect.isTrue(f21 is F21<int>); | 909 Expect.isTrue(f21 is F21<int>); |
| 938 Expect.isFalse(f21 is F21<bool>); | 910 Expect.isFalse(f21 is F21<bool>); |
| 939 Expect.isTrue(confuse(f21) is F21<int>); | 911 Expect.isTrue(confuse(f21) is F21<int>); |
| 940 Expect.isFalse(confuse(f21) is F21<bool>); | 912 Expect.isFalse(confuse(f21) is F21<bool>); |
| 941 Expect.equals(tIsDynamic, m21 is F21<bool>); | 913 Expect.equals(tIsDynamic, m21 is F21<bool>); |
| 942 Expect.equals(tIsDynamic, confuse(m21) is F21<bool>); | 914 Expect.equals(tIsDynamic, confuse(m21) is F21<bool>); |
| 943 } else { | 915 } else { |
| 944 if (inCheckedMode) { | 916 if (typeAssertionsEnabled) { |
| 945 Expect.throws(() { | 917 Expect.throws(() { |
| 946 x21 = (f21 as dynamic); | 918 x21 = (f21 as dynamic); |
| 947 }); | 919 }); |
| 948 Expect.throws(() { | 920 Expect.throws(() { |
| 949 x21 = confuse(f21); | 921 x21 = confuse(f21); |
| 950 }); | 922 }); |
| 951 List<T> Function<A>(int x) Function() l21; | 923 List<T> Function<A>(int x) Function() l21; |
| 952 Expect.throws(() { | 924 Expect.throws(() { |
| 953 l21 = (f21 as dynamic); | 925 l21 = (f21 as dynamic); |
| 954 }); | 926 }); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 986 x22 = confuse(m22); | 958 x22 = confuse(m22); |
| 987 l22 = confuse(m22); | 959 l22 = confuse(m22); |
| 988 } | 960 } |
| 989 } | 961 } |
| 990 | 962 |
| 991 void main() { | 963 void main() { |
| 992 new U60().runTests(); | 964 new U60().runTests(); |
| 993 new U60<int>(tIsInt: true).runTests(); | 965 new U60<int>(tIsInt: true).runTests(); |
| 994 new U60<bool>(tIsBool: true).runTests(); | 966 new U60<bool>(tIsBool: true).runTests(); |
| 995 } | 967 } |
| OLD | NEW |