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 361d4c8b830ac918da044d3eb7d0324bd24a98b7..e413c40051b6e71cce8a74c5e6d46d81781f99e3 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( |
| @@ -322,10 +332,10 @@ public class NegativeResolverTest extends CompilerTestCase { |
| "set bar(x) {}", |
| "class foo {}", |
| "class bar{}"), |
| - errEx(ResolverErrorCode.DUPLICATE_TOP_LEVEL_DEFINITION, 2, 5, 3), |
| - errEx(ResolverErrorCode.DUPLICATE_TOP_LEVEL_DEFINITION, 4, 7, 3), |
| - errEx(ResolverErrorCode.DUPLICATE_TOP_LEVEL_DEFINITION, 3, 5, 3), |
| - errEx(ResolverErrorCode.DUPLICATE_TOP_LEVEL_DEFINITION, 5, 7, 3)); |
| + errEx(ResolverErrorCode.DUPLICATE_TOP_LEVEL_DEFINITION, 2, 5, 3), |
|
codefu
2012/01/19 21:48:54
ws.
scheglov
2012/01/20 15:59:24
Done.
|
| + errEx(ResolverErrorCode.DUPLICATE_TOP_LEVEL_DEFINITION, 4, 7, 3), |
| + errEx(ResolverErrorCode.DUPLICATE_TOP_LEVEL_DEFINITION, 3, 5, 3), |
| + errEx(ResolverErrorCode.DUPLICATE_TOP_LEVEL_DEFINITION, 5, 7, 3)); |
| } |
| public void test_nameShadow_topLevel_class_getterSetter() { |