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

Unified Diff: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java

Issue 25592002: Private methods from different libraries cannot collide. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java
index 9e70e6598310ba4151bb7b8d53b1601917708a44..c1a9afbc7a4996280a8a7b56e3dcba81270a0747 100644
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java
@@ -1265,6 +1265,38 @@ public class NonErrorResolverTest extends ResolverTestCase {
verify(source);
}
+ public void test_instanceMethodNameCollidesWithSuperclassStatic_field() throws Exception {
+ Source source = addSource(createSource(//
+ "import 'lib.dart';",
+ "class B extends A {",
+ " _m() {}",
+ "}"));
+ addSource("/lib.dart", createSource(//
+ "library L;",
+ "class A {",
+ " static var _m;",
+ "}"));
+ resolve(source);
+ assertNoErrors(source);
+ verify(source);
+ }
+
+ public void test_instanceMethodNameCollidesWithSuperclassStatic_method() throws Exception {
+ Source source = addSource(createSource(//
+ "import 'lib.dart';",
+ "class B extends A {",
+ " _m() {}",
+ "}"));
+ addSource("/lib.dart", createSource(//
+ "library L;",
+ "class A {",
+ " static _m() {}",
+ "}"));
+ resolve(source);
+ assertErrors(source, HintCode.OVERRIDDING_PRIVATE_MEMBER);
+ verify(source);
+ }
+
public void test_invalidAnnotation_constantVariable() throws Exception {
Source source = addSource(createSource(//
"const C = 0;",

Powered by Google App Engine
This is Rietveld 408576698