Chromium Code Reviews| Index: tests/language/regress_22700_test.dart |
| =================================================================== |
| --- tests/language/regress_22700_test.dart (revision 0) |
| +++ tests/language/regress_22700_test.dart (working copy) |
| @@ -0,0 +1,23 @@ |
| +// Copyright (c) 2015, 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. |
| + |
| +class WrapT<T> { |
| + Type get type => T; |
| +} |
| + |
| +class MyClass<T> { |
| + factory MyClass.works() { |
| + Type t = new WrapT<T>().type; |
| + print(t); |
| + } |
| + |
| + factory MyClass.works2() { |
| + print(T); |
| + } |
| +} |
| + |
| +main() { |
| + new MyClass<String>.works(); |
| + new MyClass<String>.works2(); |
|
Ivan Posva
2015/03/09 16:48:07
It would be nice if the test also verified that no
regis
2015/03/09 19:39:05
Done.
|
| +} |