Index: pkg/compiler/lib/src/compiler.dart |
diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart |
index 3d03876821b687f7785b322174289f74bd86e975..1b01849c9558a21ac442383036edcd05909a46f6 100644 |
--- a/pkg/compiler/lib/src/compiler.dart |
+++ b/pkg/compiler/lib/src/compiler.dart |
@@ -1894,6 +1894,25 @@ class _CompilerResolution implements Resolution { |
} |
@override |
+ bool hasResolvedAst(Element element) { |
+ return element is AstElement && |
+ hasBeenResolved(element) && |
+ element.hasResolvedAst; |
+ } |
+ |
+ @override |
+ ResolvedAst getResolvedAst(Element element) { |
+ if (hasResolvedAst(element)) { |
+ AstElement astElement = element; |
+ return astElement.resolvedAst; |
+ } |
+ assert(invariant(element, hasResolvedAst(element), |
+ message: "ResolvedAst not available for $element.")); |
+ return null; |
+ } |
+ |
+ |
+ @override |
bool hasResolutionImpact(Element element) { |
return _resolutionImpactCache.containsKey(element); |
} |