| 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 82993a7f864d7967b2463c5bb0f6391f83a25760..eac32375f498200199f63c22a927fc9a79d4acf7 100644
|
| --- a/compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java
|
| +++ b/compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java
|
| @@ -314,6 +314,16 @@ public class NegativeResolverTest extends CompilerTestCase {
|
| checkNumErrors("ConstVariableInitializationNegativeTest2.dart", 1);
|
| }
|
|
|
| + public void test_nameShadow_topLevel_method_class() {
|
| + checkSourceErrors(
|
| + makeCode(
|
| + "// filler filler filler filler filler filler filler filler filler filler",
|
| + "foo() {}",
|
| + "class foo {}"),
|
| + errEx(ResolverErrorCode.DUPLICATE_TOP_LEVEL_DEFINITION, 2, 1, 3),
|
| + errEx(ResolverErrorCode.DUPLICATE_TOP_LEVEL_DEFINITION, 3, 7, 3));
|
| + }
|
| +
|
| public void test_nameShadow_topLevel_getterSetter_class() {
|
| checkSourceErrors(
|
| makeCode(
|
|
|