| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 import "package:expect/expect.dart"; |
| 6 |
| 5 class A<T> { | 7 class A<T> { |
| 6 Function closure; | 8 Function closure; |
| 7 A._(this.closure); | 9 A._(this.closure); |
| 8 | 10 |
| 9 factory A() { | 11 factory A() { |
| 10 return new A._(() => new Set<T>()); | 12 return new A._(() => new Set<T>()); |
| 11 } | 13 } |
| 12 | 14 |
| 13 A.bar() { | 15 A.bar() { |
| 14 closure = () => new Set<T>(); | 16 closure = () => new Set<T>(); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 s = ((new A<int>.bar()).closure)(); | 57 s = ((new A<int>.bar()).closure)(); |
| 56 Expect.isTrue(s is Set<int>); | 58 Expect.isTrue(s is Set<int>); |
| 57 Expect.isFalse(s is Set<double>); | 59 Expect.isFalse(s is Set<double>); |
| 58 | 60 |
| 59 A.staticMethod("not_null"); | 61 A.staticMethod("not_null"); |
| 60 print(A.staticField); | 62 print(A.staticField); |
| 61 | 63 |
| 62 A.staticMethod2(null); | 64 A.staticMethod2(null); |
| 63 print(A.staticField2); | 65 print(A.staticField2); |
| 64 } | 66 } |
| OLD | NEW |