Index: pkg/compiler/lib/src/resolution/constructors.dart |
diff --git a/pkg/compiler/lib/src/resolution/constructors.dart b/pkg/compiler/lib/src/resolution/constructors.dart |
index ce4e93c191ccbc31d87e1924d2f867f050560b3e..aa7007231dce00116e7afd07f7428284e973d747 100644 |
--- a/pkg/compiler/lib/src/resolution/constructors.dart |
+++ b/pkg/compiler/lib/src/resolution/constructors.dart |
@@ -66,7 +66,9 @@ class InitializerResolver { |
return node.receiver.asIdentifier().isThis(); |
} |
- reportDuplicateInitializerError(Element field, Node init, Node existing) { |
+ reportDuplicateInitializerError(Element field, |
+ Node init, |
+ Spannable existing) { |
reporter.reportError( |
reporter.createMessage( |
init, |
@@ -90,7 +92,9 @@ class InitializerResolver { |
field.parseNode(visitor.resolution.parsing); |
Expression initializer = field.initializer; |
if (initializer != null) { |
- reportDuplicateInitializerError(field, init, initializer); |
+ reportDuplicateInitializerError(field, init, |
+ reporter.withCurrentElement(field, |
+ () => reporter.spanFromSpannable(initializer))); |
} |
} |
initialized[field] = init; |