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

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

Issue 2924363002: Improve error messages. (Closed)
Patch Set: Updates after testing. Created 3 years, 6 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/kernel/kernel_target.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
index 798e61b7ce04a51a4981d5b0588d6af8e029b6d5..78129b6b13e501a46dfadfad41091b0ea727bf7d 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
@@ -109,6 +109,10 @@ class KernelTarget extends TargetImplementation {
loader = createLoader();
}
+ bool get hasErrors {
+ return errors.isNotEmpty || loader.collectCompileTimeErrors().isNotEmpty;
+ }
+
void addError(file, int charOffset, String message) {
Uri uri = file is String ? Uri.parse(file) : file;
InputError error = new InputError(uri, charOffset, message);
@@ -281,7 +285,9 @@ class KernelTarget extends TargetImplementation {
loader.finishStaticInvocations();
finishAllConstructors();
loader.finishNativeMethods();
- runBuildTransformations();
+ if (!hasErrors) {
+ runBuildTransformations();
ahe 2017/06/09 08:13:14 The parser reports a recoverable error on code lik
+ }
if (verify) this.verify();
errors.addAll(loader.collectCompileTimeErrors().map((e) => e.format()));

Powered by Google App Engine
This is Rietveld 408576698