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

Unified Diff: frog/leg/resolver.dart

Issue 9086010: closure calls (just the invocation part). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update test status file. Created 8 years, 12 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/namer.dart ('k') | frog/leg/ssa/builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/leg/resolver.dart
diff --git a/frog/leg/resolver.dart b/frog/leg/resolver.dart
index 414f2b1e5c218eb8cedbf02b7536e0f70cd47b44..1e8ff66a4aa48d7fa58ccdb6656f2f9d1df8b65f 100644
--- a/frog/leg/resolver.dart
+++ b/frog/leg/resolver.dart
@@ -317,7 +317,15 @@ class FullResolverVisitor extends ResolverVisitor {
Element receiver = visit(node.receiver);
visit(node.argumentsNode);
- Identifier selector = node.selector;
+ Identifier selector = node.selector.asIdentifier();
+ if (selector === null) {
+ // We are calling a closure returned from an expression.
+ assert(node.selector.asExpression() !== null);
+ assert(receiver === null);
+ visit(node.selector);
+ return null;
+ }
+
SourceString name = selector.source;
// No need to assign an element for a logical operation.
if (isLogicalOperator(selector)) return null;
« no previous file with comments | « frog/leg/namer.dart ('k') | frog/leg/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698