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

Unified Diff: compiler/java/com/google/dart/compiler/resolver/Resolver.java

Issue 8479041: https://code.google.com/p/dart/issues/detail?id=255 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 1 month 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/Resolver.java
===================================================================
--- compiler/java/com/google/dart/compiler/resolver/Resolver.java (revision 1268)
+++ compiler/java/com/google/dart/compiler/resolver/Resolver.java (working copy)
@@ -1333,13 +1333,15 @@
}
private void resolveInitializers(DartMethodDefinition node) {
- assert null != node;
Iterator<DartInitializer> initializers = node.getInitializers().iterator();
ConstructorElement constructorElement = null;
while (initializers.hasNext()) {
DartInitializer initializer = initializers.next();
Element element = resolve(initializer);
- if (ElementKind.of(element) == ElementKind.CONSTRUCTOR) {
+ if ((ElementKind.of(element) == ElementKind.CONSTRUCTOR) && initializer.isInvocation()) {
+ if (constructorElement != null) {
+ onError(initializer, ResolverErrorCode.SUPER_INVOCATION_NOT_UNIQUE);
+ }
constructorElement = (ConstructorElement) element;
}
}

Powered by Google App Engine
This is Rietveld 408576698