Index: compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java |
diff --git a/compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java b/compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java |
index f1a2d79d4cb74608c4b7100e686dac1b1b3b97f2..1b35e00cf31acb19434d0169380f7064603ca163 100644 |
--- a/compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java |
+++ b/compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java |
@@ -1211,4 +1211,15 @@ public class NegativeResolverTest extends CompilerTestCase { |
Type boundType = typeParameter.getBound().getType(); |
assertEquals("A", boundType.getElement().getName()); |
} |
+ |
+ public void test_methodCannotBeResolved() throws Exception { |
+ checkSourceErrors( |
+ makeCode( |
+ "class A {", |
+ "}", |
+ "method() {", |
+ " A.method();", // error |
+ "}"), |
+ errEx(ResolverErrorCode.CANNOT_RESOLVE_METHOD_IN_CLASS, 4, 5, 6)); |
+ } |
} |