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

Unified Diff: frog/leg/ssa/closure.dart

Issue 9740003: Disable closures in initializers and fail instead of crashing. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status file. Created 8 years, 9 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
« no previous file with comments | « frog/leg/ssa/builder.dart ('k') | tests/language/language-leg.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/leg/ssa/closure.dart
diff --git a/frog/leg/ssa/closure.dart b/frog/leg/ssa/closure.dart
index 7414a5698967148206c4615ca64c95ae0ab73655..ad364e758fd42b8202192e05921d335dd877646d 100644
--- a/frog/leg/ssa/closure.dart
+++ b/frog/leg/ssa/closure.dart
@@ -376,7 +376,10 @@ class ClosureTranslator extends AbstractVisitor {
// TODO(ahe): This is problematic. The backend should not repeat
// the work of the resolver. It is the resolver's job to create
// parameters, etc. Other phases should only visit statements.
- node.visitChildren(this);
+ // TODO(floitsch): we avoid visiting the initializers on purpose so that we
+ // get an error-message later in the builder.
+ if (node.parameters !== null) node.parameters.accept(this);
ahe 2012/03/20 21:12:30 Visiting the parameters is also problematic. Long
+ if (node.body !== null) node.body.accept(this);
attachCapturedScopeVariables(node);
« no previous file with comments | « frog/leg/ssa/builder.dart ('k') | tests/language/language-leg.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698