Skip to content

Commit

Permalink
[JVM] Fix compilation for list of void statements
Browse files Browse the repository at this point in the history
Fixes 'my (\x) = 42' (gave an ArrayIndexOutOfBoundException before).
  • Loading branch information
usev6 committed Mar 31, 2018
1 parent 0d344c2 commit 29793bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vm/jvm/QAST/Compiler.nqp
Expand Up @@ -4246,7 +4246,7 @@ class QAST::CompilerJAST {
$il.append($last_res.jast)
unless $void && nqp::istype($_, QAST::Var) && !nqp::istype($_, QAST::VarWithFallback);
$*STACK.obtain($il, $last_res);
if $resultchild == $i && $resultchild != $n - 1 {
if !$all_void && $resultchild == $i && $resultchild != $n - 1 {
$res_type := $last_res.type;
$res_temp := fresh($res_type);
$il.append(JAST::Instruction.new( :op(store_ins($res_type)), $res_temp ));
Expand Down

0 comments on commit 29793bb

Please sign in to comment.