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

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: Fixes for review comments 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..79f39304d1f41273320236dfc9fd4b4874160df5 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
@@ -179,6 +179,22 @@ public class SimpleResolverTest extends ResolverTestCase {
verify(source);
}
+ public void test_hasReferenceToSuper() 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].hasReferenceToSuper());
+ assertTrue(classes[1].hasReferenceToSuper());
+ assertNoErrors();
+ verify(source);
+ }
+
public void test_importWithPrefix() throws Exception {
addSource("/two.dart", createSource(//
"library two;",

Powered by Google App Engine
This is Rietveld 408576698