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

Unified Diff: sdk/lib/_internal/compiler/implementation/compiler.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/compiler.dart
diff --git a/sdk/lib/_internal/compiler/implementation/compiler.dart b/sdk/lib/_internal/compiler/implementation/compiler.dart
index 0137e2f2dcf8766f0aa96b2e569ce73b52d4b5f7..115e482b8d494b98a49db853d2e1a5e3f8e8c4e1 100644
--- a/sdk/lib/_internal/compiler/implementation/compiler.dart
+++ b/sdk/lib/_internal/compiler/implementation/compiler.dart
@@ -409,7 +409,7 @@ abstract class Compiler implements DiagnosticListener {
}
void pleaseReportCrash() {
- print(MessageKind.PLEASE_REPORT_THE_CRASH.message([BUILD_ID]));
+ print(MessageKind.PLEASE_REPORT_THE_CRASH.message({'buildId': BUILD_ID}));
}
void cancel(String reason, {Node node, Token token,
@@ -433,6 +433,9 @@ abstract class Compiler implements DiagnosticListener {
}
SourceSpan spanFromSpannable(Spannable node, [Uri uri]) {
+ if (node == CURRENT_ELEMENT_SPANNABLE) {
+ node = currentElement;
+ }
if (node is Node) {
return spanFromNode(node, uri);
} else if (node is Token) {
@@ -862,8 +865,9 @@ abstract class Compiler implements DiagnosticListener {
var kind = rejectDeprecatedFeatures
? api.Diagnostic.ERROR : api.Diagnostic.WARNING;
var message = rejectDeprecatedFeatures
- ? MessageKind.DEPRECATED_FEATURE_ERROR.error([feature])
- : MessageKind.DEPRECATED_FEATURE_WARNING.error([feature]);
+ ? MessageKind.DEPRECATED_FEATURE_ERROR.error({'featureName': feature})
+ : MessageKind.DEPRECATED_FEATURE_WARNING.error(
+ {'featureName': feature});
reportMessage(spanFromSpannable(span), message, kind);
return true;
}

Powered by Google App Engine
This is Rietveld 408576698