| Index: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
|
| diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
|
| index 6cd8bf7827b2cbec2839d989b11f1a7139a16340..21757cd235358f1e0c037485f094af4028f7e647 100644
|
| --- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
|
| +++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
|
| @@ -1479,6 +1479,45 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
|
| verify(source);
|
| }
|
|
|
| + public void test_instanceMemberAccessFromStatic_field() throws Exception {
|
| + Source source = addSource(createSource(//
|
| + "class A {",
|
| + " int f;",
|
| + " static foo() {",
|
| + " f;",
|
| + " }",
|
| + "}"));
|
| + resolve(source);
|
| + assertErrors(CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_STATIC);
|
| + verify(source);
|
| + }
|
| +
|
| + public void test_instanceMemberAccessFromStatic_getter() throws Exception {
|
| + Source source = addSource(createSource(//
|
| + "class A {",
|
| + " get g => null;",
|
| + " static foo() {",
|
| + " g;",
|
| + " }",
|
| + "}"));
|
| + resolve(source);
|
| + assertErrors(CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_STATIC);
|
| + verify(source);
|
| + }
|
| +
|
| + public void test_instanceMemberAccessFromStatic_method() throws Exception {
|
| + Source source = addSource(createSource(//
|
| + "class A {",
|
| + " m() {}",
|
| + " static foo() {",
|
| + " m();",
|
| + " }",
|
| + "}"));
|
| + resolve(source);
|
| + assertErrors(CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_STATIC);
|
| + verify(source);
|
| + }
|
| +
|
| public void test_invalidConstructorName_notEnclosingClassName() throws Exception {
|
| Source source = addSource(createSource(//
|
| "class A {",
|
|
|