Index: pkg/front_end/lib/src/fasta/loader.dart |
diff --git a/pkg/front_end/lib/src/fasta/loader.dart b/pkg/front_end/lib/src/fasta/loader.dart |
index 08fa08f19c91f5496456f486eb91d12af4418d5a..743dcf6eaf3e20bf9026f5a580d4ddb88275eebc 100644 |
--- a/pkg/front_end/lib/src/fasta/loader.dart |
+++ b/pkg/front_end/lib/src/fasta/loader.dart |
@@ -10,12 +10,13 @@ import 'dart:collection' show Queue; |
import 'builder/builder.dart' show Builder, LibraryBuilder; |
-import 'deprecated_problems.dart' |
- show firstSourceUri, deprecated_printUnexpected; |
+import 'deprecated_problems.dart' show firstSourceUri; |
import 'messages.dart' |
show LocatedMessage, Message, messagePlatformPrivateLibraryAccess; |
+import 'severity.dart' show Severity; |
+ |
import 'target_implementation.dart' show TargetImplementation; |
import 'ticker.dart' show Ticker; |
@@ -174,7 +175,8 @@ ${format(ms / libraryCount, 3, 12)} ms/compilation unit."""); |
void addCompileTimeError(Message message, int charOffset, Uri fileUri, |
{bool silent: false, bool wasHandled: false}) { |
if (!silent) { |
- deprecated_printUnexpected(fileUri, charOffset, message.message); |
+ target.context |
+ .report(message.withLocation(fileUri, charOffset), Severity.error); |
} |
(wasHandled ? handledErrors : unhandledErrors) |
.add(message.withLocation(fileUri, charOffset)); |