Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(277)

Unified Diff: lib/compiler/implementation/resolver.dart

Issue 10913133: Allow closures inside lazy initializers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add another test. Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: lib/compiler/implementation/resolver.dart
diff --git a/lib/compiler/implementation/resolver.dart b/lib/compiler/implementation/resolver.dart
index 7d3eae2b4d500f482a329245e9f842c19d815ab9..81abde52513a04830c7bd48ab67ebfee35a689a1 100644
--- a/lib/compiler/implementation/resolver.dart
+++ b/lib/compiler/implementation/resolver.dart
@@ -1369,6 +1369,9 @@ class ResolverVisitor extends CommonResolverVisitor<Element> {
} else {
name = node.name.asIdentifier().source;
}
+ if (scope.element.kind == ElementKind.VARIABLE_LIST) {
+ compiler.internalError("Bad enclosing element", node: node);
+ }
FunctionElement enclosing = new FunctionElement.node(
name, node, ElementKind.FUNCTION, Modifiers.EMPTY,
scope.element);

Powered by Google App Engine
This is Rietveld 408576698