Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
propagate wanted thru callstatic as well as call
  • Loading branch information
TimToady committed Dec 16, 2015
1 parent ef8929a commit 083e070
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Perl6/Actions.nqp
Expand Up @@ -78,7 +78,7 @@ sub wanted($ast,$by) {
$ast.annotate('past_block', wanted($ast.ann('past_block'), $byby));
$ast.annotate('WANTED',1);
}
elsif $ast.op eq 'call' || $ast.op eq 'handle' {
elsif $ast.op eq 'call' || $ast.op eq 'callstatic' || $ast.op eq 'handle' {
$ast[0] := WANTED($ast[0], $byby) if +@($ast);
}
elsif $ast.op eq 'while' {
Expand All @@ -94,6 +94,9 @@ sub wanted($ast,$by) {
$node.annotate('past_block', WANTED($node.ann('past_block'), $byby));
}
}
elsif nqp::istype($node,QAST::Op) && $node.op eq 'callstatic' {
$node[0] := WANTED($node[0], $byby);
}
elsif nqp::istype($node,QAST::Op) && $node.op eq 'p6for' {
$node := $node[1];
if nqp::istype($node,QAST::Op) && $node.op eq 'p6capturelex' {
Expand Down

0 comments on commit 083e070

Please sign in to comment.