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; |
} |
} |