Index: pkg/analysis_server/test/services/correction/fix_test.dart |
diff --git a/pkg/analysis_server/test/services/correction/fix_test.dart b/pkg/analysis_server/test/services/correction/fix_test.dart |
index 30c16e5f536c469f3ee3ca3ae7f4ac0ba8b42e98..e0cb23b361129db997db74579aa4d9ff749756f0 100644 |
--- a/pkg/analysis_server/test/services/correction/fix_test.dart |
+++ b/pkg/analysis_server/test/services/correction/fix_test.dart |
@@ -3233,7 +3233,7 @@ main() { |
assertNoFix(DartFixKind.CREATE_METHOD); |
} |
- void test_undefinedMethod_create_generic_BAD() { |
+ void test_undefinedMethod_create_generic_BAD_argumentType() { |
resolveTestUnit(''' |
class A<T> { |
B b; |
@@ -3262,6 +3262,31 @@ class B { |
'''); |
} |
+ void test_undefinedMethod_create_generic_BAD_returnType() { |
+ resolveTestUnit(''' |
+class A<T> { |
+ main() { |
+ T t = new B().compute(); |
+ } |
+} |
+ |
+class B { |
+} |
+'''); |
+ assertHasFix(DartFixKind.CREATE_METHOD, ''' |
+class A<T> { |
+ main() { |
+ T t = new B().compute(); |
+ } |
+} |
+ |
+class B { |
+ dynamic compute() { |
+ } |
+} |
+'''); |
+ } |
+ |
void test_undefinedMethod_create_generic_OK_literal() { |
resolveTestUnit(''' |
class A { |