Index: pkg/front_end/lib/src/fasta/source/source_loader.dart |
diff --git a/pkg/front_end/lib/src/fasta/source/source_loader.dart b/pkg/front_end/lib/src/fasta/source/source_loader.dart |
index 964d1ece04ca9f0e5dae7ab35745581d4798260f..7f430a77ca97f412582d05c13f66438de2a0192d 100644 |
--- a/pkg/front_end/lib/src/fasta/source/source_loader.dart |
+++ b/pkg/front_end/lib/src/fasta/source/source_loader.dart |
@@ -32,8 +32,7 @@ import '../builder/builder.dart' |
import '../compiler_context.dart' show CompilerContext; |
-import '../deprecated_problems.dart' |
- show deprecated_formatUnexpected, deprecated_inputError; |
+import '../deprecated_problems.dart' show deprecated_inputError; |
import '../export.dart' show Export; |
@@ -58,6 +57,8 @@ import '../parser/class_member_parser.dart' show ClassMemberParser; |
import '../scanner.dart' show ErrorToken, ScannerResult, Token, scan; |
+import '../severity.dart' show Severity; |
+ |
import '../type_inference/type_inference_engine.dart' show TypeInferenceEngine; |
import 'diet_listener.dart' show DietListener; |
@@ -530,7 +531,8 @@ class SourceLoader<L> extends Loader<L> { |
} |
Expression buildCompileTimeError(Message message, int offset, Uri uri) { |
- String text = deprecated_formatUnexpected(uri, offset, message.message); |
+ String text = target.context |
+ .format(message.withLocation(uri, offset), Severity.error); |
return target.backendTarget.buildCompileTimeError(coreTypes, text, offset); |
} |
} |