| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 interface Interface<T> default Factory<T> { | 5 // The list of type parameters in the default factory clause can be omitted. |
| 6 |
| 7 interface Interface<T> default Factory { |
| 6 Interface(); | 8 Interface(); |
| 7 Interface.withArg(T value); | 9 Interface.withArg(T value); |
| 8 } | 10 } |
| 9 | 11 |
| 10 class Factory<T> { | 12 class Factory<T> { |
| 11 factory Interface() { | 13 factory Interface() { |
| 12 return null; | 14 return null; |
| 13 } | 15 } |
| 14 | 16 |
| 15 factory Interface.withArg(value) { | 17 factory Interface.withArg(value) { |
| 16 return null; | 18 return null; |
| 17 } | 19 } |
| 18 } | 20 } |
| 19 | 21 |
| 20 main() { | 22 main() { |
| 21 new Interface(); | 23 new Interface(); |
| 22 new Interface.withArg(4); | 24 new Interface.withArg(4); |
| 23 } | 25 } |
| OLD | NEW |