Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix over-assuming optimization of R.
It dropped values on the floor when there were more than two args,
as happens with list assoc things like `R,`.
  • Loading branch information
jnthn committed Aug 16, 2016
1 parent 05cdc14 commit 1628e48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Perl6/Optimizer.nqp
Expand Up @@ -1649,7 +1649,7 @@ class Perl6::Optimizer {
$op[1],
$op[2]) );
} elsif $metaop.name eq '&METAOP_REVERSE' && $!symbols.is_from_core('&METAOP_REVERSE') {
return NQPMu unless nqp::istype($metaop[0], QAST::Var);
return NQPMu unless nqp::istype($metaop[0], QAST::Var) && +@($op) == 3;
return QAST::Op.new( :op('call'), :name($metaop[0].name),
$op[2],
$op[1]);
Expand Down

0 comments on commit 1628e48

Please sign in to comment.