Index: pkg/compiler/lib/src/resolution/resolution_common.dart |
diff --git a/pkg/compiler/lib/src/resolution/resolution_common.dart b/pkg/compiler/lib/src/resolution/resolution_common.dart |
index cb045cf1c5a87774b25b87aef6d63abf20efa3f2..5d3efcb717ec50ad0a56ccbf22a4ec89193afb79 100644 |
--- a/pkg/compiler/lib/src/resolution/resolution_common.dart |
+++ b/pkg/compiler/lib/src/resolution/resolution_common.dart |
@@ -13,13 +13,7 @@ class ResolverTask extends CompilerTask { |
WorldImpact resolve(Element element) { |
return measure(() { |
- if (Elements.isErroneous(element)) { |
- // TODO(johnniwinther): Add a predicate for this. |
- assert(invariant(element, element is! ErroneousElement, |
- message: "Element $element expected to have parse errors.")); |
- _ensureTreeElements(element); |
- return const WorldImpact(); |
- } |
+ if (Elements.isErroneous(element)) return null; |
WorldImpact processMetadata([WorldImpact result]) { |
for (MetadataAnnotation metadata in element.metadata) { |