Chromium Code Reviews| 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 9178eb0ff7bfef06148e20197a951f1070b11f2e..836e1d0865812b550227d7ef37a0d2a6e787811f 100644 |
| --- a/compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java |
| +++ b/compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java |
| @@ -1309,6 +1309,28 @@ public class NegativeResolverTest extends CompilerTestCase { |
| Type boundType = typeParameter.getBound().getType(); |
| assertEquals("A", boundType.getElement().getName()); |
| } |
| + |
| + /** |
| + * <p> |
| + * http://code.google.com/p/dart/issues/detail?id=3986 |
| + */ |
| + public void test_memberWithNameOfClass() throws Exception { |
|
Brian Wilkerson
2012/07/11 14:54:15
Consider adding tests for static members. Also, th
|
| + checkSourceErrors( |
| + makeCode( |
| + "// filler filler filler filler filler filler filler filler filler filler", |
| + "class A {", |
| + " A() {}", |
| + "}", |
| + "class B {", |
| + " var B;", |
| + "}", |
| + "class C {", |
| + " void C() {}", |
| + "}", |
| + ""), |
| + errEx(ResolverErrorCode.MEMBER_WITH_NAME_OF_CLASS, 6, 7, 1), |
| + errEx(ResolverErrorCode.CONSTRUCTOR_CANNOT_HAVE_RETURN_TYPE, 9, 3, 4)); |
| + } |
| public void test_methodCannotBeResolved() throws Exception { |
| checkSourceErrors( |