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

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

Issue 12082024: Use named arguments for messages. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 7 years, 11 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 39c084d954d32477d73f01a6c7f466b4148761fd..cf5c49482749957560416b592bb6946a042f69ae 100644
--- a/sdk/lib/_internal/compiler/implementation/library_loader.dart
+++ b/sdk/lib/_internal/compiler/implementation/library_loader.dart
@@ -319,12 +319,12 @@ class LibraryLoaderTask extends LibraryLoader {
Uri uri = library.entryCompilationUnit.script.uri;
compiler.reportMessage(
compiler.spanFromSpannable(tag.name, uri),
- MessageKind.DUPLICATED_LIBRARY_NAME.error([name]),
+ 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([name]),
+ MessageKind.DUPLICATED_LIBRARY_NAME.error({'libraryName': name}),
api.Diagnostic.WARNING);
}
}
@@ -374,7 +374,7 @@ class LibraryLoaderTask extends LibraryLoader {
if (wasDiagnosticEmitted) {
compiler.reportMessage(
compiler.spanFromElement(unit),
- MessageKind.MISSING_PART_OF_TAG.error([]),
+ MessageKind.MISSING_PART_OF_TAG.error(),
api.Diagnostic.INFO);
}
}
@@ -676,16 +676,19 @@ class LibraryDependencyNode {
if (existingElement != null) {
if (existingElement.isErroneous()) {
compiler.reportMessage(compiler.spanFromElement(element),
- MessageKind.DUPLICATE_EXPORT.error([name]), api.Diagnostic.ERROR);
+ MessageKind.DUPLICATE_EXPORT.error({'name': name}),
+ api.Diagnostic.ERROR);
element = existingElement;
} else if (existingElement.getLibrary() != library) {
// Declared elements hide exported elements.
compiler.reportMessage(compiler.spanFromElement(existingElement),
- MessageKind.DUPLICATE_EXPORT.error([name]), api.Diagnostic.ERROR);
+ MessageKind.DUPLICATE_EXPORT.error({'name': name}),
+ api.Diagnostic.ERROR);
compiler.reportMessage(compiler.spanFromElement(element),
- MessageKind.DUPLICATE_EXPORT.error([name]), api.Diagnostic.ERROR);
+ MessageKind.DUPLICATE_EXPORT.error({'name': name}),
+ api.Diagnostic.ERROR);
element = exportScope[name] = new ErroneousElementX(
- MessageKind.DUPLICATE_EXPORT, [name], name, library);
+ MessageKind.DUPLICATE_EXPORT, {'name': name}, name, library);
}
} else {
exportScope[name] = element;

Powered by Google App Engine
This is Rietveld 408576698