| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 Foo<T> extends Bar<T> { | 5 class Foo<T> extends Bar<T> { |
| 6 | 6 |
| 7 factory Foo() = Bar; | 7 factory Foo() = Bar; |
| 8 | 8 |
| 9 Foo.create() : super.create() { } | 9 Foo.create() : super.create() { } |
| 10 } | 10 } |
| 11 | 11 |
| 12 class Bar<T | 12 class Bar<T |
| 13 extends num // /// 01: static type warning, dynamic type error | 13 extends num // //# 01: static type warning, dynamic type error |
| 14 > { | 14 > { |
| 15 factory Bar() { | 15 factory Bar() { |
| 16 return new Foo<T>.create(); | 16 return new Foo<T>.create(); |
| 17 } | 17 } |
| 18 | 18 |
| 19 Bar.create() { } | 19 Bar.create() { } |
| 20 } | 20 } |
| 21 | 21 |
| 22 main() { | 22 main() { |
| 23 new Foo<String>(); | 23 new Foo<String>(); |
| 24 } | 24 } |
| OLD | NEW |