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

Unified Diff: frog/leg/ssa/builder.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 | « no previous file | frog/leg/ssa/closure.dart » ('j') | frog/leg/ssa/closure.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/leg/ssa/builder.dart
diff --git a/frog/leg/ssa/builder.dart b/frog/leg/ssa/builder.dart
index 086bc88312d503b6c231df69ca385656e088d155..478124917ba365f509fcb27d4631c4aa2e9e90ce 100644
--- a/frog/leg/ssa/builder.dart
+++ b/frog/leg/ssa/builder.dart
@@ -1239,6 +1239,11 @@ class SsaBuilder implements Visitor {
visitFunctionExpression(FunctionExpression node) {
ClosureData nestedClosureData = closureDataCache[node];
+ if (nestedClosureData === null) {
+ // TODO(floitsch): we can only assume that the reason for not having a
+ // closure data here is, because the function is inside an initializer.
+ compiler.unimplemented("Closures inside initializers", node: node);
+ }
assert(nestedClosureData !== null);
assert(nestedClosureData.closureClassElement !== null);
ClassElement closureClassElement =
« no previous file with comments | « no previous file | frog/leg/ssa/closure.dart » ('j') | frog/leg/ssa/closure.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698