Index: pkg/compiler/lib/src/kernel/element_map_impl.dart |
diff --git a/pkg/compiler/lib/src/kernel/element_map_impl.dart b/pkg/compiler/lib/src/kernel/element_map_impl.dart |
index c08b5f6030a563b28fe19db3d81504653bde6d24..642806795aac7108b8ac6ded81471beac1f0d485 100644 |
--- a/pkg/compiler/lib/src/kernel/element_map_impl.dart |
+++ b/pkg/compiler/lib/src/kernel/element_map_impl.dart |
@@ -896,6 +896,10 @@ abstract class ElementCreatorMixin { |
} |
Local _getLocalFunction(ir.TreeNode node) { |
+ assert( |
+ node is ir.FunctionDeclaration || node is ir.FunctionExpression, |
+ failedAt( |
+ CURRENT_ELEMENT_SPANNABLE, 'Invalid local function node: $node')); |
return _localFunctionMap.putIfAbsent(node, () { |
MemberEntity memberContext; |
Entity executableContext; |