OLD | NEW |
1 // compile options: --hoist-signature-types --hoist-instance-creation --hoist-ty
pe-tests | |
2 // 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 |
3 // 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 |
4 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
5 import "package:expect/expect.dart"; | 4 import "package:expect/expect.dart"; |
6 | 5 |
7 class A<T> { | 6 class A<T> { |
8 A(this.x, T z); | 7 A(this.x, T z); |
9 A.make(); | 8 A.make(); |
10 void f(T x) {} | 9 void f(T x) {} |
11 static String g(String x) { | 10 static String g(String x) { |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 Expect.isTrue(b.f is ToVoid<int>); | 54 Expect.isTrue(b.f is ToVoid<int>); |
56 Expect.isTrue(B.g is Id<int>); | 55 Expect.isTrue(B.g is Id<int>); |
57 } | 56 } |
58 { | 57 { |
59 C c = new C(0, 1); | 58 C c = new C(0, 1); |
60 Expect.isTrue(c is C); | 59 Expect.isTrue(c is C); |
61 Expect.isTrue(c.f is ToVoid<int>); | 60 Expect.isTrue(c.f is ToVoid<int>); |
62 Expect.isTrue(C.g is Id<int>); | 61 Expect.isTrue(C.g is Id<int>); |
63 } | 62 } |
64 } | 63 } |
OLD | NEW |