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

Unified Diff: sdk/lib/_internal/compiler/implementation/elements/modelx.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/elements/modelx.dart
diff --git a/sdk/lib/_internal/compiler/implementation/elements/modelx.dart b/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
index 2d1bf8f456e5b5a4fb8af4d763d9bc502c060a7b..8fc8369a25a2596974020dcb7afd4a1d37a79759 100644
--- a/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
+++ b/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
@@ -297,7 +297,7 @@ class ElementX implements Element {
*/
class ErroneousElementX extends ElementX implements ErroneousElement {
final MessageKind messageKind;
- final List messageArguments;
+ final Map messageArguments;
ErroneousElementX(this.messageKind, this.messageArguments,
SourceString name, Element enclosing)
@@ -357,7 +357,7 @@ class AmbiguousElementX extends ElementX implements AmbiguousElement {
/**
* The message arguments to report on resolving this element.
*/
- final List messageArguments;
+ final Map messageArguments;
/**
* The first element that this ambiguous element might refer to.
@@ -512,7 +512,8 @@ class CompilationUnitElementX extends ElementX
if (expectedName != actualName) {
listener.reportMessage(
listener.spanFromSpannable(tag.name),
- MessageKind.LIBRARY_NAME_MISMATCH.error([expectedName]),
+ MessageKind.LIBRARY_NAME_MISMATCH.error(
+ {'libraryName': expectedName}),
api.Diagnostic.WARNING);
}
}
@@ -603,7 +604,7 @@ class LibraryElementX extends ElementX implements LibraryElement {
// TODO(johnniwinther): Provide access to the import tags from which
// the elements came.
importScope[element.name] = new AmbiguousElementX(
- MessageKind.DUPLICATE_IMPORT, [element.name],
+ MessageKind.DUPLICATE_IMPORT, {'name': element.name},
this, existing, element);
} else {
importScope[element.name] = element;

Powered by Google App Engine
This is Rietveld 408576698