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

Unified Diff: pkg/analysis_server/test/analysis/notification_implemented_test.dart

Issue 1488443002: Issue 25057. A static member cannot be implemented. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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/domains/analysis/implemented_dart.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/analysis/notification_implemented_test.dart
diff --git a/pkg/analysis_server/test/analysis/notification_implemented_test.dart b/pkg/analysis_server/test/analysis/notification_implemented_test.dart
index 5c1c6eda26e3e077e8478c28049fc712c7d24e91..d5cde860d996ea8d9c91b3d9413d19171142f1fd 100644
--- a/pkg/analysis_server/test/analysis/notification_implemented_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_implemented_test.dart
@@ -315,6 +315,84 @@ class B extends A {
assertHasImplementedMember('f(_) {} // A');
}
+ test_static_field_instanceStatic() async {
+ addTestFile('''
+class A {
+ int F = 0;
+}
+class B extends A {
+ static int F = 1;
+}
+''');
+ await prepareImplementedElements();
+ assertNoImplementedMember('F = 0');
+ }
+
+ test_static_field_staticInstance() async {
+ addTestFile('''
+class A {
+ static int F = 0;
+}
+class B extends A {
+ int F = 1;
+}
+''');
+ await prepareImplementedElements();
+ assertNoImplementedMember('F = 0');
+ }
+
+ test_static_field_staticStatic() async {
+ addTestFile('''
+class A {
+ static int F = 0;
+}
+class B extends A {
+ static int F = 1;
+}
+''');
+ await prepareImplementedElements();
+ assertNoImplementedMember('F = 0');
+ }
+
+ test_static_method_instanceStatic() async {
+ addTestFile('''
+class A {
+ int m() => 0;
+}
+class B extends A {
+ static int m() => 1;
+}
+''');
+ await prepareImplementedElements();
+ assertNoImplementedMember('m() => 0');
+ }
+
+ test_static_method_staticInstance() async {
+ addTestFile('''
+class A {
+ static int m() => 0;
+}
+class B extends A {
+ int m() => 1;
+}
+''');
+ await prepareImplementedElements();
+ assertNoImplementedMember('m() => 0');
+ }
+
+ test_static_method_staticStatic() async {
+ addTestFile('''
+class A {
+ static int m() => 0;
+}
+class B extends A {
+ static int m() => 1;
+}
+''');
+ await prepareImplementedElements();
+ assertNoImplementedMember('m() => 0');
+ }
+
Future waitForImplementedElements() {
Future waitForNotification(int times) {
if (times == 0 || implementedClasses != null) {
« no previous file with comments | « pkg/analysis_server/lib/src/domains/analysis/implemented_dart.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698