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

Unified Diff: sdk/lib/_internal/compiler/implementation/library_loader.dart

Issue 169763003: Update dart2js diagnostics to prepare for filtering. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove optional Uri. Created 6 years, 10 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: sdk/lib/_internal/compiler/implementation/library_loader.dart
diff --git a/sdk/lib/_internal/compiler/implementation/library_loader.dart b/sdk/lib/_internal/compiler/implementation/library_loader.dart
index 478f36fd6b18cf7995415ad227bee41662d771a8..53e79da8940d381ad77b39269501451fcaa8b85b 100644
--- a/sdk/lib/_internal/compiler/implementation/library_loader.dart
+++ b/sdk/lib/_internal/compiler/implementation/library_loader.dart
@@ -343,16 +343,16 @@ class LibraryLoaderTask extends LibraryLoader {
LibraryElement existing =
libraryNames.putIfAbsent(name, () => library);
if (!identical(existing, library)) {
- Uri uri = library.entryCompilationUnit.script.uri;
- compiler.reportMessage(
- compiler.spanFromSpannable(tag.name, uri),
- MessageKind.DUPLICATED_LIBRARY_NAME.error({'libraryName': name}),
- api.Diagnostic.WARNING);
- Uri existingUri = existing.entryCompilationUnit.script.uri;
- compiler.reportMessage(
- compiler.spanFromSpannable(existing.libraryTag.name, existingUri),
- MessageKind.DUPLICATED_LIBRARY_NAME.error({'libraryName': name}),
- api.Diagnostic.WARNING);
+ compiler.withCurrentElement(library, () {
+ compiler.reportWarning(tag.name,
+ MessageKind.DUPLICATED_LIBRARY_NAME,
+ {'libraryName': name});
+ });
+ compiler.withCurrentElement(existing, () {
+ compiler.reportWarning(existing.libraryTag.name,
+ MessageKind.DUPLICATED_LIBRARY_NAME,
+ {'libraryName': name});
+ });
}
}
}

Powered by Google App Engine
This is Rietveld 408576698