| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 // Dart test program for testing factory generic result types. |
| 5 |
| 6 class A<T> { |
| 7 A() { } |
| 8 factory A.factory() { |
| 9 return new A<String>(); |
| 10 } |
| 11 } |
| 12 |
| 13 class B<T> extends A<T> { |
| 14 B() { } |
| 15 factory B.factory() { |
| 16 return new B<String>(); |
| 17 } |
| 18 } |
| 19 |
| 20 |
| 21 main() { |
| 22 new A<String>.factory(); |
| 23 new A<int>.factory(); /// 00: dynamic type error |
| 24 new B<String>.factory(); |
| 25 new B<int>.factory(); /// 01: dynamic type error |
| 26 } |
| OLD | NEW |