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

Unified Diff: pkg/compiler/lib/src/js_backend/backend.dart

Issue 1525603002: Associate compile-time errors with elements (Closed) Base URL: git@github.com:dart-lang/sdk.git@_temporary_fletch_patches
Patch Set: Created 5 years 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/compiler/lib/src/js_backend/backend.dart
diff --git a/pkg/compiler/lib/src/js_backend/backend.dart b/pkg/compiler/lib/src/js_backend/backend.dart
index f735910908177a75a908455b26f353e96696e34d..4001820f7d84002cc52c4f4d12cd941487c359e1 100644
--- a/pkg/compiler/lib/src/js_backend/backend.dart
+++ b/pkg/compiler/lib/src/js_backend/backend.dart
@@ -1565,7 +1565,8 @@ class JavaScriptBackend extends Backend {
WorldImpact codegen(CodegenWorkItem work) {
Element element = work.element;
- if (compiler.elementHasCompileTimeError(element)) {
+ if (compiler.generateCodeWithCompileTimeErrors &&
+ compiler.elementHasCompileTimeError(element)) {
generatedCode[element] = jsAst.js(
"function () { throw new Error('Compile time error in $element') }");
Johnni Winther 2015/12/14 11:31:20 We could use the message here as well.
sigurdm 2015/12/14 12:07:43 Done.
return const CodegenImpact();

Powered by Google App Engine
This is Rietveld 408576698