Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Unified Diff: compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java

Issue 9148026: Recompile unit with potential conflict/dependency on some top-level symbol. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix for compiling corelib, so NPE in TreeShaker Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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() {

Powered by Google App Engine
This is Rietveld 408576698