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

Unified Diff: pkg/analysis_server/test/services/completion/prefixed_element_contributor_test.dart

Issue 1127643003: suggest only superclass elements for "super." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge 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/test/services/completion/completion_test_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/completion/prefixed_element_contributor_test.dart
diff --git a/pkg/analysis_server/test/services/completion/prefixed_element_contributor_test.dart b/pkg/analysis_server/test/services/completion/prefixed_element_contributor_test.dart
index 5c4bfc8dfc232b569a3deac893765c53b591f817..65cb9a432df9294673b6f8f2c8d0d2b56b532f18 100644
--- a/pkg/analysis_server/test/services/completion/prefixed_element_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/prefixed_element_contributor_test.dart
@@ -523,4 +523,45 @@ void test(Derived d) {
assertSuggestMethod('f', 'Base', 'void');
});
}
+
+ test_super() {
+ // SimpleIdentifier MethodInvocation ExpressionStatement
+ addTestSource('''
+class C3 {
+ int fi3;
+ static int fs3;
+ m() {}
+ mi3() {}
+ static ms3() {}
+}
+class C2 {
+ int fi2;
+ static int fs2;
+ m() {}
+ mi2() {}
+ static ms2() {}
+}
+class C1 extends C2 implements C3 {
+ int fi1;
+ static int fs1;
+ m() {super.^}
+ mi1() {}
+ static ms1() {}
+}''');
+ return computeFull((bool result) {
+ assertNotSuggested('fi1');
+ assertNotSuggested('fs1');
+ assertNotSuggested('mi1');
+ assertNotSuggested('ms1');
+ assertSuggestInvocationField('fi2', 'int');
+ assertNotSuggested('fs2');
+ assertSuggestInvocationMethod('mi2', 'C2', null);
+ assertNotSuggested('ms2');
+ assertSuggestInvocationMethod('m', 'C2', null);
+ assertNotSuggested('fi3');
+ assertNotSuggested('fs3');
+ assertNotSuggested('mi3');
+ assertNotSuggested('ms3');
+ });
+ }
}
« no previous file with comments | « pkg/analysis_server/test/services/completion/completion_test_util.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698