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 5bd42a15262408b0890760448a291889624241d7..05b00d18ac7597b2ca7f308ba7d8f447340387ea 100644 |
--- a/pkg/compiler/lib/src/js_backend/backend.dart |
+++ b/pkg/compiler/lib/src/js_backend/backend.dart |
@@ -2425,6 +2425,12 @@ class JavaScriptBackend extends Backend { |
} |
void onElementResolved(Element element, TreeElements elements) { |
+ if (element.isMalformed) { |
+ // Elements that are marker as malformed during parsing or resolution |
+ // might be registered here. These should just be ignored. |
+ return; |
+ } |
+ |
if ((element.isFunction || element.isConstructor) && |
annotations.noInline(element)) { |
inlineCache.markAsNonInlinable(element); |