| 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 | |
| 7 class A<T> { | 5 class A<T> { |
| 8 factory A.factory() { | 6 factory A.factory() { |
| 9 return new B<T>(); | 7 return new B<T>(); |
| 10 } | 8 } |
| 11 | 9 |
| 12 A(); | 10 A(); |
| 13 | 11 |
| 14 build() { | 12 build() { |
| 15 return new A<T>(); | 13 return new A<T>(); |
| 16 } | 14 } |
| (...skipping 18 matching lines...) Expand all Loading... |
| 35 | 33 |
| 36 Expect.isTrue(new A<List>().build() is A<List>); | 34 Expect.isTrue(new A<List>().build() is A<List>); |
| 37 Expect.isFalse(new A<List>().build() is A<Set>); | 35 Expect.isFalse(new A<List>().build() is A<Set>); |
| 38 | 36 |
| 39 Expect.isTrue(new A<List>.factory().build() is B<List>); | 37 Expect.isTrue(new A<List>.factory().build() is B<List>); |
| 40 Expect.isFalse(new A<List>.factory().build() is B<Set>); | 38 Expect.isFalse(new A<List>.factory().build() is B<Set>); |
| 41 | 39 |
| 42 Expect.isTrue(new B<List>().build() is B<List>); | 40 Expect.isTrue(new B<List>().build() is B<List>); |
| 43 Expect.isFalse(new B<List>().build() is B<Set>); | 41 Expect.isFalse(new B<List>().build() is B<Set>); |
| 44 } | 42 } |
| OLD | NEW |