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

Unified Diff: compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java

Issue 11612027: Issue 7469. Report error if type appears in for extends and implements clauses (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove commented status line Created 8 years 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: compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
diff --git a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
index 31bb3ca82365a3e949f6f8d7c02a7eda16f1cdfe..3f278a5d1b0be2f3d00d5086e55307855127f58b 100644
--- a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
+++ b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
@@ -5333,6 +5333,20 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase {
}
/**
+ * It is a compile-time error if the superclass of a class C appears in the implements clause of C.
+ * <p>
+ * http://code.google.com/p/dart/issues/detail?id=7469
+ */
+ public void test_superClass_imImplementsClause() throws Exception {
+ AnalyzeLibraryResult result = analyzeLibrary(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "class A {}",
+ "class B extends A implements A {}",
+ "");
+ assertErrors(result.getErrors(), errEx(ResolverErrorCode.SUPER_CLASS_IN_IMPLEMENTS, 3, 30, 1));
+ }
+
+ /**
* We should report only "no such type", but not duplicate.
* <p>
* http://code.google.com/p/dart/issues/detail?id=5084
« no previous file with comments | « compiler/java/com/google/dart/compiler/resolver/SupertypeResolver.java ('k') | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698