Skip to content

Commit

Permalink
Void context variable can generate no code.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Aug 10, 2014
1 parent 6f9397f commit 224c4f7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/vm/moar/QAST/QASTCompilerMAST.nqp
Original file line number Diff line number Diff line change
Expand Up @@ -1206,6 +1206,11 @@ my class MASTCompilerInstance {
}
}

# Declaration in void context need generate no code.
if nqp::isconcrete($want) && $want == $MVM_reg_void {
return MAST::InstructionList.new([], MAST::VOID, $MVM_reg_void);
}

# Now go by scope.
my $name := $node.name;
my @ins;
Expand Down

0 comments on commit 224c4f7

Please sign in to comment.