Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
allow wanted to be called on bogus asts
  • Loading branch information
TimToady committed Dec 13, 2015
1 parent d2bc69e commit 2807a3c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Perl6/Actions.nqp
Expand Up @@ -17,6 +17,7 @@ sub block_closure($code) {
}

sub wanted($ast) {
return $ast unless nqp::can($ast,'ann');
return $ast if $ast.ann('WANTED'); # already marked from here down
return $ast if $ast.ann('wanted'); # already marked from here down
if nqp::istype($ast,QAST::Stmt) ||
Expand Down

0 comments on commit 2807a3c

Please sign in to comment.