| Index: tests/compiler/dart2js_extra/typevariable_factory_test.dart
|
| diff --git a/tests/language/private_selector_lib.dart b/tests/compiler/dart2js_extra/typevariable_factory_test.dart
|
| similarity index 52%
|
| copy from tests/language/private_selector_lib.dart
|
| copy to tests/compiler/dart2js_extra/typevariable_factory_test.dart
|
| index c9a11c9b34ac40a3d631ffec1f16b497757e62f8..5618cae2caea06d6ff4245fa7c76c1a2fae34f82 100644
|
| --- a/tests/language/private_selector_lib.dart
|
| +++ b/tests/compiler/dart2js_extra/typevariable_factory_test.dart
|
| @@ -2,18 +2,14 @@
|
| // 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.
|
|
|
| -library private_selector_lib;
|
| +// Regression test to ensure that we can use type variable in factories.
|
|
|
| -import 'private_selector_test.dart';
|
| -
|
| -bool executed = false;
|
| -
|
| -class A {
|
| - public() {
|
| - new B()._private();
|
| - }
|
| -
|
| - _private() {
|
| - executed = true;
|
| +class A<T> {
|
| + factory A.foo(o) {
|
| + Expect.isTrue(o is A<T>);
|
| + return new A();
|
| }
|
| + A();
|
| }
|
| +
|
| +main() => new A<int>.foo(new A<int>());
|
|
|