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

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

Issue 8846002: Tweaks for reporting duplicates, issue 519. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix for issue 647. Remove FIELD. Created 9 years 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/ResolverTest.java
diff --git a/compiler/javatests/com/google/dart/compiler/resolver/ResolverTest.java b/compiler/javatests/com/google/dart/compiler/resolver/ResolverTest.java
index 4371e256255e0102aa05f0a4958ae60e292f9ba1..a260a111aa995a88f78754a11e0d4516fced4634 100644
--- a/compiler/javatests/com/google/dart/compiler/resolver/ResolverTest.java
+++ b/compiler/javatests/com/google/dart/compiler/resolver/ResolverTest.java
@@ -497,106 +497,6 @@ public class ResolverTest extends ResolverTestCase {
"}"));
}
- public void testNameConflict() {
- resolveAndTest(Joiner.on("\n").join(
- "class Object {}",
- "class A {",
- " var foo;",
- " var foo;",
- "}"),
- ResolverErrorCode.NAME_CLASHES_EXISTING_MEMBER);
-
- resolveAndTest(Joiner.on("\n").join(
- "class Object {}",
- "class A {",
- " foo() {}",
- " set foo(x) {}",
- "}"),
- ResolverErrorCode.NAME_CLASHES_EXISTING_MEMBER);
-
- // Same test, but reverse the order of setter and method
- resolveAndTest(Joiner.on("\n").join(
- "class Object {}",
- "class A {",
- " set foo(x) {}",
- " foo() {}",
- "}"),
- ResolverErrorCode.NAME_CLASHES_EXISTING_MEMBER);
-
- resolveAndTest(Joiner.on("\n").join(
- "class Object {}",
- "class A {",
- " var foo;",
- " set foo(x) {}",
- "}"),
- ResolverErrorCode.NAME_CLASHES_EXISTING_MEMBER);
-
- resolveAndTest(Joiner.on("\n").join(
- "class Object {}",
- "class A {",
- " get foo() {}",
- " var foo;",
- "}"),
- ResolverErrorCode.NAME_CLASHES_EXISTING_MEMBER);
-
-
- resolveAndTest(Joiner.on("\n").join(
- "class Object {}",
- "class A {",
- " var foo;",
- " get foo() {}",
- "}"),
- ResolverErrorCode.NAME_CLASHES_EXISTING_MEMBER);
-
- resolveAndTest(Joiner.on("\n").join(
- "class Object {}",
- "class A {",
- " set foo(x) {}",
- " var foo;",
- "}"),
- ResolverErrorCode.NAME_CLASHES_EXISTING_MEMBER);
-
- resolveAndTest(Joiner.on("\n").join(
- "class Object {}",
- "get foo() {}",
- "class foo {}",
- "set bar(x) {}",
- "class bar {}"),
- ResolverErrorCode.DUPLICATE_DEFINITION,
- ResolverErrorCode.DUPLICATE_DEFINITION,
- ResolverErrorCode.DUPLICATE_DEFINITION,
- ResolverErrorCode.DUPLICATE_DEFINITION);
-
- // Same test but in different order
- resolveAndTest(Joiner.on("\n").join(
- "class Object {}",
- "class foo {}",
- "get foo() {}",
- "class bar {}",
- "set bar(x) {}"),
- ResolverErrorCode.DUPLICATE_DEFINITION,
- ResolverErrorCode.DUPLICATE_DEFINITION,
- ResolverErrorCode.DUPLICATE_DEFINITION,
- ResolverErrorCode.DUPLICATE_DEFINITION);
-
-
- resolveAndTest(Joiner.on("\n").join(
- "class Object {}",
- "set bar(x) {}",
- "set bar(x) {}"),
- ResolverErrorCode.DUPLICATE_DEFINITION,
- ResolverErrorCode.DUPLICATE_DEFINITION,
- ResolverErrorCode.FIELD_CONFLICTS);
-
- resolveAndTest(Joiner.on("\n").join(
- "class Object {}",
- "get bar() {}",
- "get bar() {}"),
- ResolverErrorCode.DUPLICATE_DEFINITION,
- ResolverErrorCode.DUPLICATE_DEFINITION,
- ResolverErrorCode.FIELD_CONFLICTS);
- }
-
/**
* Tests for the 'new' keyword
*/

Powered by Google App Engine
This is Rietveld 408576698