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

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

Issue 26817006: Don't resolve private inherited members. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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/StaticWarningCodeTest.java
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticWarningCodeTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticWarningCodeTest.java
index 69ef4da07bbe3b3a7f2d44b22f2a8bb2ac7e0a03..aef05fe51e3c330d83c4123009994e349ebc5ca8 100644
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticWarningCodeTest.java
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticWarningCodeTest.java
@@ -2268,6 +2268,40 @@ public class StaticWarningCodeTest extends ResolverTestCase {
assertErrors(source, StaticWarningCode.UNDEFINED_IDENTIFIER);
}
+ public void test_undefinedIdentifier_private_getter() throws Exception {
+ addSource("/lib.dart", createSource(//
+ "library lib;",
+ "class A {",
+ " var _foo;",
+ "}"));
+ Source source = addSource(createSource(//
+ "import 'lib.dart';",
+ "class B extends A {",
+ " test() {",
+ " var v = _foo;",
+ " }",
+ "}"));
+ resolve(source);
+ assertErrors(source, StaticWarningCode.UNDEFINED_IDENTIFIER);
+ }
+
+ public void test_undefinedIdentifier_private_setter() throws Exception {
+ addSource("/lib.dart", createSource(//
+ "library lib;",
+ "class A {",
+ " var _foo;",
+ "}"));
+ Source source = addSource(createSource(//
+ "import 'lib.dart';",
+ "class B extends A {",
+ " test() {",
+ " _foo = 42;",
+ " }",
+ "}"));
+ resolve(source);
+ assertErrors(source, StaticWarningCode.UNDEFINED_IDENTIFIER);
+ }
+
public void test_undefinedNamedParameter() throws Exception {
Source source = addSource(createSource(//
"f({a, b}) {}",

Powered by Google App Engine
This is Rietveld 408576698