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())); |