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

Unified Diff: sdk/lib/_internal/compiler/implementation/resolution/members.dart

Issue 11829020: Report errors on repeated interfaces. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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: sdk/lib/_internal/compiler/implementation/resolution/members.dart
diff --git a/sdk/lib/_internal/compiler/implementation/resolution/members.dart b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
index 278e8009aefd1f5e80cbc64889ec83823f4221ee..f1d2008df6d7612aa1043e488bbc6561b835e822 100644
--- a/sdk/lib/_internal/compiler/implementation/resolution/members.dart
+++ b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
@@ -2709,6 +2709,14 @@ class ClassResolverVisitor extends TypeDefinitionVisitor {
TypeAnnotation typeAnnotation = link.head;
error(typeAnnotation.typeName, MessageKind.CLASS_NAME_EXPECTED, []);
} else {
+ if (interfaceType == element.supertype) {
+ error(link.head,
ahe 2013/01/09 13:15:31 As these errors are recoverable, it would be nice
Johnni Winther 2013/01/10 06:55:13 Done.
+ MessageKind.DUPLICATE_EXTENDS_IMPLEMENTS,
+ [interfaceType]);
+ }
+ if (interfaces.contains(interfaceType)) {
+ error(link.head, MessageKind.DUPLICATE_IMPLEMENTS, [interfaceType]);
+ }
interfaces = interfaces.prepend(interfaceType);
if (isBlackListed(interfaceType)) {
error(link.head, MessageKind.CANNOT_IMPLEMENT, [interfaceType]);

Powered by Google App Engine
This is Rietveld 408576698