OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 lib; |
| 6 |
| 7 @MirrorsUsed(targets: "lib") |
5 import 'dart:mirrors'; | 8 import 'dart:mirrors'; |
6 import 'package:expect/expect.dart'; | 9 import 'package:expect/expect.dart'; |
7 | 10 |
8 class A<T> {} | 11 class A<T> {} |
9 class B<T extends A> extends A implements C{ | 12 class B<T extends A> extends A implements C{ |
10 A m(A a) {} | 13 A m(A a) {} |
11 A field; | 14 A field; |
12 } | 15 } |
13 class C<S,T> {} | 16 class C<S,T> {} |
14 class D extends A<int> {} | 17 class D extends A<int> {} |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 Expect.equals(dynamicMirror, returnTypeA.typeArguments.single); | 60 Expect.equals(dynamicMirror, returnTypeA.typeArguments.single); |
58 Expect.equals(dynamicMirror, parameterTypeA.typeArguments.single); | 61 Expect.equals(dynamicMirror, parameterTypeA.typeArguments.single); |
59 Expect.equals(dynamicMirror, fieldTypeA.typeArguments.single); | 62 Expect.equals(dynamicMirror, fieldTypeA.typeArguments.single); |
60 Expect.equals(dynamicMirror, upperBoundA.typeArguments.single); | 63 Expect.equals(dynamicMirror, upperBoundA.typeArguments.single); |
61 Expect.equals(dynamicMirror, cInstance.typeArguments.first); | 64 Expect.equals(dynamicMirror, cInstance.typeArguments.first); |
62 Expect.equals(dynamicMirror, cInstance.typeArguments.last); | 65 Expect.equals(dynamicMirror, cInstance.typeArguments.last); |
63 Expect.equals(dynamicMirror, cNestedInstance.typeArguments.last); | 66 Expect.equals(dynamicMirror, cNestedInstance.typeArguments.last); |
64 Expect.equals(dynamicMirror, cTypeArgument.typeArguments.first); | 67 Expect.equals(dynamicMirror, cTypeArgument.typeArguments.first); |
65 Expect.equals(dynamicMirror, cTypeArgument.typeArguments.last); | 68 Expect.equals(dynamicMirror, cTypeArgument.typeArguments.last); |
66 } | 69 } |
OLD | NEW |