Index: pkg/analyzer/test/src/summary/resynthesize_test.dart |
diff --git a/pkg/analyzer/test/src/summary/resynthesize_test.dart b/pkg/analyzer/test/src/summary/resynthesize_test.dart |
index d51c40200fe397fbffa8ebab166672d11b2885e0..aa4fd9d64309559daf3c9c403ddb9db9e3baf2f6 100644 |
--- a/pkg/analyzer/test/src/summary/resynthesize_test.dart |
+++ b/pkg/analyzer/test/src/summary/resynthesize_test.dart |
@@ -1915,6 +1915,18 @@ class D extends C { |
'''); |
} |
+ test_constructor_redirected_factory_named_generic() { |
+ checkLibrary(''' |
+class C<T, U> { |
+ factory C() = D<U, T>.named; |
+ C._(); |
+} |
+class D<T, U> extends C<U, T> { |
+ D.named() : super._(); |
+} |
+'''); |
+ } |
+ |
test_constructor_redirected_factory_named_imported() { |
addLibrarySource( |
'/foo.dart', |
@@ -1933,6 +1945,24 @@ class C { |
'''); |
} |
+ test_constructor_redirected_factory_named_imported_generic() { |
+ addLibrarySource( |
+ '/foo.dart', |
+ ''' |
+import 'test.dart'; |
+class D<T, U> extends C<U, T> { |
+ D.named() : super._(); |
+} |
+'''); |
+ checkLibrary(''' |
+import 'foo.dart'; |
+class C<T, U> { |
+ factory C() = D<U, T>.named; |
+ C._(); |
+} |
+'''); |
+ } |
+ |
test_constructor_redirected_factory_named_prefixed() { |
addLibrarySource( |
'/foo.dart', |
@@ -1951,6 +1981,24 @@ class C { |
'''); |
} |
+ test_constructor_redirected_factory_named_prefixed_generic() { |
+ addLibrarySource( |
+ '/foo.dart', |
+ ''' |
+import 'test.dart'; |
+class D<T, U> extends C<U, T> { |
+ D.named() : super._(); |
+} |
+'''); |
+ checkLibrary(''' |
+import 'foo.dart' as foo; |
+class C<T, U> { |
+ factory C() = foo.D<U, T>.named; |
+ C._(); |
+} |
+'''); |
+ } |
+ |
test_constructor_redirected_factory_unnamed() { |
checkLibrary(''' |
class C { |
@@ -1963,6 +2011,18 @@ class D extends C { |
'''); |
} |
+ test_constructor_redirected_factory_unnamed_generic() { |
+ checkLibrary(''' |
+class C<T, U> { |
+ factory C() = D<U, T>; |
+ C._(); |
+} |
+class D<T, U> extends C<U, T> { |
+ D() : super._(); |
+} |
+'''); |
+ } |
+ |
test_constructor_redirected_factory_unnamed_imported() { |
addLibrarySource( |
'/foo.dart', |
@@ -1981,6 +2041,24 @@ class C { |
'''); |
} |
+ test_constructor_redirected_factory_unnamed_imported_generic() { |
+ addLibrarySource( |
+ '/foo.dart', |
+ ''' |
+import 'test.dart'; |
+class D<T, U> extends C<U, T> { |
+ D() : super._(); |
+} |
+'''); |
+ checkLibrary(''' |
+import 'foo.dart'; |
+class C<T, U> { |
+ factory C() = D<U, T>; |
+ C._(); |
+} |
+'''); |
+ } |
+ |
test_constructor_redirected_factory_unnamed_prefixed() { |
addLibrarySource( |
'/foo.dart', |
@@ -1999,6 +2077,24 @@ class C { |
'''); |
} |
+ test_constructor_redirected_factory_unnamed_prefixed_generic() { |
+ addLibrarySource( |
+ '/foo.dart', |
+ ''' |
+import 'test.dart'; |
+class D<T, U> extends C<U, T> { |
+ D() : super._(); |
+} |
+'''); |
+ checkLibrary(''' |
+import 'foo.dart' as foo; |
+class C<T, U> { |
+ factory C() = foo.D<U, T>; |
+ C._(); |
+} |
+'''); |
+ } |
+ |
test_constructor_redirected_thisInvocation_named() { |
checkLibrary(''' |
class C { |