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

Unified Diff: compiler/java/com/google/dart/compiler/resolver/SupertypeResolver.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/java/com/google/dart/compiler/resolver/SupertypeResolver.java
diff --git a/compiler/java/com/google/dart/compiler/resolver/SupertypeResolver.java b/compiler/java/com/google/dart/compiler/resolver/SupertypeResolver.java
index 0aef7bcb7de08c3ef0d123a617271b5931a35a67..6e1b911ecd316aa2baa72c34f45e7262a520e3c7 100644
--- a/compiler/java/com/google/dart/compiler/resolver/SupertypeResolver.java
+++ b/compiler/java/com/google/dart/compiler/resolver/SupertypeResolver.java
@@ -4,6 +4,7 @@
package com.google.dart.compiler.resolver;
+import com.google.common.base.Objects;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Sets;
import com.google.dart.compiler.DartCompilerContext;
@@ -111,6 +112,10 @@ public class SupertypeResolver {
topLevelContext.onError(intNode, ResolverErrorCode.DUPLICATE_IMPLEMENTS_TYPE);
continue;
}
+ if (Objects.equal(intType, supertype)) {
+ topLevelContext.onError(intNode, ResolverErrorCode.SUPER_CLASS_IN_IMPLEMENTS);
+ continue;
+ }
seenImplement.add(intType);
}
// OK, add

Powered by Google App Engine
This is Rietveld 408576698