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

Unified Diff: pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart

Issue 2924363002: Improve error messages. (Closed)
Patch Set: Updates after testing. Created 3 years, 6 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: pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart
index 28dffb9b4179e487c10bb5602c2ac27a8ad434ed..5e132003d7678dfcc2cc5c541046d2180b065513 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart
@@ -749,14 +749,11 @@ class KernelLibraryBuilder
});
}
}
- if (isExport) {
- addNit(charOffset,
- "'$name' is exported from both '${uri}' and '${otherUri}'.");
- } else {
- addNit(charOffset,
- "'$name' is imported from both '${uri}' and '${otherUri}'.");
- }
- return new KernelInvalidTypeBuilder(name, charOffset, fileUri);
+ String message = isExport
+ ? "'$name' is exported from both '${uri}' and '${otherUri}'."
+ : "'$name' is imported from both '${uri}' and '${otherUri}'.";
+ addNit(charOffset, message);
+ return new KernelInvalidTypeBuilder(name, charOffset, fileUri, message);
}
int finishStaticInvocations() {

Powered by Google App Engine
This is Rietveld 408576698