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 // Test that substitutions are emitted for classes that are only used as | 5 // Test that substitutions are emitted for classes that are only used as |
6 // type arguments. | 6 // type arguments. |
7 | 7 |
8 import 'package:expect/expect.dart'; | 8 import 'package:expect/expect.dart'; |
9 | 9 |
10 class K {} | 10 class K {} |
11 | 11 |
12 class A<T> {} | 12 class A<T> {} |
13 | 13 |
14 class B extends A<K> {} | 14 class B extends A<K> {} |
15 | 15 |
16 class X<T> {} | 16 class X<T> {} |
17 | 17 |
18 main() { | 18 main() { |
19 var v = new DateTime.now().millisecondsSinceEpoch != 42 | 19 var v = new DateTime.now().millisecondsSinceEpoch != 42 |
20 ? new X<B>() : new X<A<String>>(); | 20 ? new X<B>() |
| 21 : new X<A<String>>(); |
21 Expect.isFalse(v is X<A<String>>); | 22 Expect.isFalse(v is X<A<String>>); |
22 } | 23 } |
OLD | NEW |