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

Unified Diff: pkg/analyzer/test/generated/static_type_warning_code_test.dart

Issue 2304293002: Issue 27221. Report UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER for staticField.method() in su… (Closed)
Patch Set: Created 4 years, 3 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/analyzer/lib/src/generated/error_verifier.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/generated/static_type_warning_code_test.dart
diff --git a/pkg/analyzer/test/generated/static_type_warning_code_test.dart b/pkg/analyzer/test/generated/static_type_warning_code_test.dart
index b86c0ef11066fb5a3d718f3ed9483062425a75bd..14e3c4af9cf395f353e0c77a43e3891a24420692 100644
--- a/pkg/analyzer/test/generated/static_type_warning_code_test.dart
+++ b/pkg/analyzer/test/generated/static_type_warning_code_test.dart
@@ -2205,6 +2205,24 @@ class B extends A {
]);
}
+ void test_unqualifiedReferenceToNonLocalStaticMember_getter_invokeTarget() {
+ assertErrorsInCode(
+ r'''
+class A {
+ static int foo;
+}
+
+class B extends A {
+ static bar() {
+ foo.abs();
+ }
+}
+''',
+ [
+ StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER
+ ]);
+ }
+
void test_unqualifiedReferenceToNonLocalStaticMember_method() {
assertErrorsInCode(
r'''
« no previous file with comments | « pkg/analyzer/lib/src/generated/error_verifier.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698