Index: pkg/compiler/lib/src/resolution/tree_elements.dart |
diff --git a/pkg/compiler/lib/src/resolution/tree_elements.dart b/pkg/compiler/lib/src/resolution/tree_elements.dart |
index c4c6b5f1d319c393472374582ffc92071425d387..c68b64d36b912eb3b7aabdf8a8abc996e09aa640 100644 |
--- a/pkg/compiler/lib/src/resolution/tree_elements.dart |
+++ b/pkg/compiler/lib/src/resolution/tree_elements.dart |
@@ -352,8 +352,9 @@ class TreeElementMapping extends TreeElements { |
} |
@override |
- Element getFunctionDefinition(FunctionExpression node) { |
- return this[node]; |
+ FunctionElement getFunctionDefinition(FunctionExpression node) { |
+ Element e = this[node]; |
+ return e is FunctionElement ? e : null; |
} |
@override |