Index: pkg/compiler/lib/src/elements/elements.dart |
diff --git a/pkg/compiler/lib/src/elements/elements.dart b/pkg/compiler/lib/src/elements/elements.dart |
index 3315cb638bc3dbc09584ad1283d7af7ed767a748..1b2e6a58404ed0b5423c3ca3fca59608aab81338 100644 |
--- a/pkg/compiler/lib/src/elements/elements.dart |
+++ b/pkg/compiler/lib/src/elements/elements.dart |
@@ -470,7 +470,8 @@ class Elements { |
static bool isInStaticContext(Element element) { |
if (isUnresolved(element)) return true; |
if (element.enclosingElement.isClosure) { |
- var closureClass = element.enclosingElement; |
+ dynamic closureClass = element.enclosingElement; |
+ // ignore: UNDEFINED_GETTER |
element = closureClass.methodElement; |
} |
Element outer = element.outermostEnclosingMemberOrTopLevel; |