| 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 class A<T> { | 5 class A<T> { |
| 6 Function closure; | 6 Function closure; |
| 7 A._(this.closure); | 7 A._(this.closure); |
| 8 | 8 |
| 9 factory A() { | 9 factory A() { |
| 10 return new A._(() => new Set<T>()); | 10 return new A._(() => new Set<T>()); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 Expect.isTrue(s is Set); | 49 Expect.isTrue(s is Set); |
| 50 | 50 |
| 51 s = ((new A<int>()).closure)(); | 51 s = ((new A<int>()).closure)(); |
| 52 Expect.isTrue(s is Set<int>); | 52 Expect.isTrue(s is Set<int>); |
| 53 Expect.isFalse(s is Set<double>); | 53 Expect.isFalse(s is Set<double>); |
| 54 | 54 |
| 55 s = ((new A<int>.bar()).closure)(); | 55 s = ((new A<int>.bar()).closure)(); |
| 56 Expect.isTrue(s is Set<int>); | 56 Expect.isTrue(s is Set<int>); |
| 57 Expect.isFalse(s is Set<double>); | 57 Expect.isFalse(s is Set<double>); |
| 58 | 58 |
| 59 A.staticMethod("not_null"); | 59 var x = A.staticMethod("not_null"); |
| 60 print(x); |
| 60 print(A.staticField); | 61 print(A.staticField); |
| 61 | 62 |
| 62 A.staticMethod2(null); | 63 A.staticMethod2(null); |
| 63 print(A.staticField2); | 64 print(A.staticField2); |
| 64 } | 65 } |
| OLD | NEW |