Index: tests/kernel/unsorted/type_args_regression_test.dart |
diff --git a/tests/kernel/unsorted/type_args_regression_test.dart b/tests/kernel/unsorted/type_args_regression_test.dart |
new file mode 100644 |
index 0000000000000000000000000000000000000000..4546530d18c256f85d7e5105c9258c18f186322a |
--- /dev/null |
+++ b/tests/kernel/unsorted/type_args_regression_test.dart |
@@ -0,0 +1,22 @@ |
+// Copyright (c) 2016, 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. |
+ |
+import 'expect.dart'; |
+ |
+class Box<T> { |
+ T value; |
+ |
+ Box(this.value); |
+ |
+ factory Box.a(T v) => new Box(v); |
+ factory Box.b(T v) = Box<T>; |
+ factory Box.c(T v) => new Box(v); |
+} |
+ |
+main() { |
+ Expect.isTrue(new Box<int>(1).value == 1); |
+ Expect.isTrue(new Box<int>.a(1).value == 1); |
+ Expect.isTrue(new Box<int>.b(1).value == 1); |
+ Expect.isTrue(new Box<int>.c(1).value == 1); |
+} |