Chromium Code Reviews| Index: tests/language/src/NonParameterizedFactoryTest.dart |
| =================================================================== |
| --- tests/language/src/NonParameterizedFactoryTest.dart (revision 0) |
| +++ tests/language/src/NonParameterizedFactoryTest.dart (revision 0) |
| @@ -0,0 +1,25 @@ |
| +// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| +// for details. All rights reserved. Use of this source code is governed by a |
| +// BSD-style license that can be found in the LICENSE file. |
| + |
| +interface Interface<T> factory Factory { |
| + Interface(); |
| + Interface.withArg(T value); |
| +} |
| + |
| +class Factory { |
| + factory Interface() { |
|
ahe
2011/10/25 13:19:11
Interface<T>
ngeoffray
2011/10/25 13:33:08
Adding those make the VM complain instead of crash
|
| + return null; |
| + } |
| + |
| + factory Interface.withArg(value) { |
|
ahe
2011/10/25 13:19:11
Interface<T>
|
| + return null; |
| + } |
| +} |
| + |
| +main() { |
| + new Interface(); |
| + new Interface<int>(); |
| + new Interface.withArg(4); |
| + new Interface<int>.withArg(4); |
| +} |