| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 library test.relation_assignable; | 5 library test.relation_assignable; |
| 6 | 6 |
| 7 @MirrorsUsed(targets: "test.relation_assignable") |
| 7 import "dart:mirrors"; | 8 import "dart:mirrors"; |
| 8 | 9 |
| 9 import "package:expect/expect.dart"; | 10 import "package:expect/expect.dart"; |
| 10 | 11 |
| 11 class Superclass {} | 12 class Superclass {} |
| 12 class Subclass1 extends Superclass {} | 13 class Subclass1 extends Superclass {} |
| 13 class Subclass2 extends Superclass {} | 14 class Subclass2 extends Superclass {} |
| 14 | 15 |
| 15 typedef bool NumberPredicate(num x); | 16 typedef bool NumberPredicate(num x); |
| 16 typedef bool IntegerPredicate(int x); | 17 typedef bool IntegerPredicate(int x); |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 Expect.isFalse(Void.isAssignableTo(TFromB)); | 317 Expect.isFalse(Void.isAssignableTo(TFromB)); |
| 317 Expect.isFalse(Void.isAssignableTo(TFromC)); | 318 Expect.isFalse(Void.isAssignableTo(TFromC)); |
| 318 | 319 |
| 319 Expect.isTrue(Dynamic.isAssignableTo(Void)); | 320 Expect.isTrue(Dynamic.isAssignableTo(Void)); |
| 320 Expect.isTrue(Void.isAssignableTo(Dynamic)); | 321 Expect.isTrue(Void.isAssignableTo(Dynamic)); |
| 321 } | 322 } |
| 322 | 323 |
| 323 main() { | 324 main() { |
| 324 test(currentMirrorSystem()); | 325 test(currentMirrorSystem()); |
| 325 } | 326 } |
| OLD | NEW |