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

Unified Diff: pkg/compiler/lib/src/elements/modelx.dart

Issue 1248483008: Split MessageKind into a MessageKind key and a MessageTemplate. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 5 years, 5 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
« no previous file with comments | « pkg/compiler/lib/src/dump_info.dart ('k') | pkg/compiler/lib/src/io/start_end_information.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/elements/modelx.dart
diff --git a/pkg/compiler/lib/src/elements/modelx.dart b/pkg/compiler/lib/src/elements/modelx.dart
index 85d7579254bfdbc65626ec294b95baad64e10c9f..0f96bdb1751460de7e9bbdc77ff067fcb3df895f 100644
--- a/pkg/compiler/lib/src/elements/modelx.dart
+++ b/pkg/compiler/lib/src/elements/modelx.dart
@@ -24,6 +24,7 @@ import '../dart2jslib.dart' show
FunctionType,
InterfaceType,
MessageKind,
+ MessageTemplate,
Script,
Selector,
SourceSpan,
@@ -308,7 +309,10 @@ class ErroneousElementX extends ElementX implements ErroneousElement {
FunctionElement asFunctionElement() => this;
- String get message => '${messageKind.message(messageArguments)}';
+ String get message {
+ return MessageTemplate.TEMPLATES[messageKind]
+ .message(messageArguments).toString();
+ }
String toString() => '<$name: $message>';
« no previous file with comments | « pkg/compiler/lib/src/dump_info.dart ('k') | pkg/compiler/lib/src/io/start_end_information.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698