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

Unified Diff: pkg/front_end/lib/src/fasta/fasta.dart

Issue 2980033004: Throw if there is no compiler context available (Closed)
Patch Set: cl comments, handle validate and deprecated_InputError Created 3 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
Index: pkg/front_end/lib/src/fasta/fasta.dart
diff --git a/pkg/front_end/lib/src/fasta/fasta.dart b/pkg/front_end/lib/src/fasta/fasta.dart
index e47b826f2771e683cdfc9ca0f99ba9c0b0f94a44..ce753f7c6af2a4c60baaa3aed037ff752ea2c666 100644
--- a/pkg/front_end/lib/src/fasta/fasta.dart
+++ b/pkg/front_end/lib/src/fasta/fasta.dart
@@ -81,8 +81,9 @@ Future<KernelTarget> outline(List<String> arguments) async {
});
} on deprecated_InputError catch (e) {
exitCode = 1;
- CompilerContext.current
- .report(deprecated_InputError.toMessage(e), Severity.error);
+ CompilerCommandLine.deprecated_withDefaultOptions(() => CompilerContext
+ .current
+ .report(deprecated_InputError.toMessage(e), Severity.error));
return null;
}
}
@@ -100,8 +101,9 @@ Future<Uri> compile(List<String> arguments) async {
});
} on deprecated_InputError catch (e) {
exitCode = 1;
- CompilerContext.current
- .report(deprecated_InputError.toMessage(e), Severity.error);
+ CompilerCommandLine.deprecated_withDefaultOptions(() => CompilerContext
+ .current
+ .report(deprecated_InputError.toMessage(e), Severity.error));
return null;
}
}
« no previous file with comments | « pkg/front_end/lib/src/fasta/compiler_context.dart ('k') | pkg/front_end/lib/src/fasta/fasta_codes_generated.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698