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

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

Issue 14698013: Report CompileTimeErrorCode.MIXIN_REFERENCES_SUPER (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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/SimpleResolverTest.java
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/SimpleResolverTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/SimpleResolverTest.java
index a6bec0672d89e9bcba29212f4f038985c27d74ab..39a98701e7b68a9256e881bc65fe92e995bbd065 100644
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/SimpleResolverTest.java
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/SimpleResolverTest.java
@@ -235,6 +235,22 @@ public class SimpleResolverTest extends ResolverTestCase {
verify(source);
}
+ public void test_isReferencesSuper() throws Exception {
+ Source source = addSource(createSource(//
+ "class A {}",
+ "class B {toString() => super.toString()}"));
+ LibraryElement library = resolve(source);
+ assertNotNull(library);
+ CompilationUnitElement unit = library.getDefiningCompilationUnit();
+ assertNotNull(unit);
+ ClassElement[] classes = unit.getTypes();
+ assertLength(2, classes);
+ assertFalse(classes[0].isReferencesSuper());
+ assertTrue(classes[1].isReferencesSuper());
+ assertNoErrors();
+ verify(source);
+ }
+
public void test_isValidMixin_badSuperclass() throws Exception {
Source source = addSource(createSource(//
"class A extends B {}",

Powered by Google App Engine
This is Rietveld 408576698