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

Unified Diff: pkg/compiler/lib/src/resolution/constructors.dart

Issue 1520293002: Add token invariant to DiagnosticReporter (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Rebase + status update Created 5 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
« no previous file with comments | « pkg/compiler/lib/src/diagnostics/invariant.dart ('k') | pkg/compiler/lib/src/resolution/enum_creator.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « pkg/compiler/lib/src/diagnostics/invariant.dart ('k') | pkg/compiler/lib/src/resolution/enum_creator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698