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

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

Issue 14622019: Report CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Check for all 'super' expressions. Don't resolve methods/accessors if invalid. Created 7 years, 7 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 ab6456f49b741ab1ff7b2d9bbb236017b06df305..8977b1506f9a2d175bb43d4d321ec6c6cd748219 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
@@ -1121,6 +1121,24 @@ public class NonErrorResolverTest extends ResolverTestCase {
verify(source);
}
+ public void test_superInInvalidContext() throws Exception {
+ Source source = addSource(createSource(//
+ "class A {",
+ " m() {}",
+ "}",
+ "class B extends A {",
+ " B() {",
+ " var v = super.m();",
+ " }",
+ " n() {",
+ " var v = super.m();",
+ " }",
+ "}"));
+ resolve(source);
+ assertNoErrors();
+ verify(source);
+ }
+
public void test_typeArgumentNotMatchingBounds_const() throws Exception {
Source source = addSource(createSource(//
"class A {}",

Powered by Google App Engine
This is Rietveld 408576698