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

Unified Diff: pkg/analysis_server/test/services/correction/fix_test.dart

Issue 1147213005: Issue 23545. Replace unaccessible type parameters with 'dynamic'. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « pkg/analysis_server/lib/src/services/correction/util.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 {
« no previous file with comments | « pkg/analysis_server/lib/src/services/correction/util.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698