Chromium Code Reviews| 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> factory Factory { | 5 interface Interface<T> factory Factory { |
| 6 Interface(); | 6 Interface(); |
| 7 Interface.withArg(T value); | 7 Interface.withArg(T value); |
| 8 } | 8 } |
| 9 | 9 |
| 10 class Factory { | 10 // A factory must be parametrized. Use legacy form. |
|
ngeoffray
2011/11/11 10:09:44
parameterized.
I don't understand the comment. Wh
ahe
2011/11/11 14:54:30
A factory *class* do not have to be parameterized.
| |
| 11 class Factory<T> { | |
|
ahe
2011/11/11 14:54:30
Remove the type variable.
srdjan
2011/11/11 16:33:39
Done.
| |
| 11 factory Interface() { | 12 factory Interface() { |
|
ahe
2011/11/11 14:54:30
This should be:
factory Interface<T>() {
srdjan
2011/11/11 16:33:39
Done.
| |
| 12 return null; | 13 return null; |
| 13 } | 14 } |
| 14 | 15 |
| 15 factory Interface.withArg(value) { | 16 factory Interface.withArg(value) { |
|
ahe
2011/11/11 14:54:30
This should be:
factory Interface<T>.withArg(valu
srdjan
2011/11/11 16:33:39
Done.
| |
| 16 return null; | 17 return null; |
| 17 } | 18 } |
| 18 } | 19 } |
|
srdjan
2011/11/11 16:33:39
Marked the test failing with bugs mentioned.
| |
| 19 | 20 |
| 20 main() { | 21 main() { |
| 21 new Interface(); | 22 new Interface(); |
| 22 new Interface.withArg(4); | 23 new Interface.withArg(4); |
| 23 } | 24 } |
| OLD | NEW |