Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(434)

Unified Diff: pkg/front_end/testcases/redirecting_factory_type_arguments.dart

Issue 2996063002: Implement type arguments in redirecting factories.
Patch Set: Merged with 6eff945874618a5a59cf62eb6d9356c6774abd3c. Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/front_end/testcases/redirecting_factory_type_arguments.dart
diff --git a/pkg/front_end/testcases/redirecting_factory_type_arguments.dart b/pkg/front_end/testcases/redirecting_factory_type_arguments.dart
new file mode 100644
index 0000000000000000000000000000000000000000..582e9025ead3c0988c1910f7c1643d77e12e5a43
--- /dev/null
+++ b/pkg/front_end/testcases/redirecting_factory_type_arguments.dart
@@ -0,0 +1,32 @@
+// Copyright (c) 2017, 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 A {}
+
+class B {}
+
+class C<C1, C2> {
+ factory C() = D<C2, C1>;
+}
+
+abstract class D<D1, D2> implements C<D2, D1> {
+ factory D() = E<D1, D2>;
+}
+
+class E<E1, E2> implements D<E1, E2> {
+ factory E() = F<E1, E2>;
+}
+
+class F<F1, F2> implements E<F1, F2> {
+ F();
+}
+
+main() {
+ "Should be F<B, A>";
+ new C<A, B>();
+ "Should be F<A, B>";
+ new D<A, B>();
+ "Should be F<A, B>";
+ new E<A, B>();
+}

Powered by Google App Engine
This is Rietveld 408576698