| Index: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticTypeWarningCodeTest.java
|
| diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticTypeWarningCodeTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticTypeWarningCodeTest.java
|
| index f11947aa2645727b0677f217ed1dc7cf44530013..e408f11b58dc47fca239b6bef24d83029317cfd3 100644
|
| --- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticTypeWarningCodeTest.java
|
| +++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticTypeWarningCodeTest.java
|
| @@ -789,6 +789,51 @@ public class StaticTypeWarningCodeTest extends ResolverTestCase {
|
| assertErrors(StaticTypeWarningCode.UNDEFINED_SUPER_METHOD);
|
| }
|
|
|
| + public void test_unqualifiedReferenceToNonLocalStaticMember_getter() throws Exception {
|
| + Source source = addSource(createSource(//
|
| + "class A {",
|
| + " static int get a => 0;",
|
| + "}",
|
| + "class B extends A {",
|
| + " int b() {",
|
| + " return a;",
|
| + " }",
|
| + "}"));
|
| + resolve(source);
|
| + assertErrors(StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER);
|
| + verify(source);
|
| + }
|
| +
|
| + public void test_unqualifiedReferenceToNonLocalStaticMember_method() throws Exception {
|
| + Source source = addSource(createSource(//
|
| + "class A {",
|
| + " static void a() {}",
|
| + "}",
|
| + "class B extends A {",
|
| + " void b() {",
|
| + " a();",
|
| + " }",
|
| + "}"));
|
| + resolve(source);
|
| + assertErrors(StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER);
|
| + verify(source);
|
| + }
|
| +
|
| + public void test_unqualifiedReferenceToNonLocalStaticMember_setter() throws Exception {
|
| + Source source = addSource(createSource(//
|
| + "class A {",
|
| + " static set a(x) {}",
|
| + "}",
|
| + "class B extends A {",
|
| + " b(y) {",
|
| + " a = y;",
|
| + " }",
|
| + "}"));
|
| + resolve(source);
|
| + assertErrors(StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER);
|
| + verify(source);
|
| + }
|
| +
|
| public void test_wrongNumberOfTypeArguments_tooFew() throws Exception {
|
| Source source = addSource(createSource(//
|
| "class A<E, F> {}",
|
|
|