Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix placeholder parameter sorting bug.
  • Loading branch information
jnthn committed Sep 21, 2011
1 parent a979ded commit 3b1fe55
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Perl6/Actions.pm
Expand Up @@ -3554,15 +3554,14 @@ class Perl6::Actions is HLL::Actions {

# Otherwise, put it in correct lexicographic position.
else {
my @shifted;
my $insert_at := 0;
for @params {
last if $_<pos_slurpy> || $_<named_slurpy> ||
$_<named_names> ||
pir::substr__SSi($_<variable_name>, 1) gt $ident;
@shifted.push(@params.shift);
$insert_at := $insert_at + 1;
}
@params.unshift(%param_info);
while @shifted { @params.unshift(@shifted.pop) }
nqp::splice(@params, [%param_info], $insert_at, 0);
}

# Add variable declaration, and evaluate to a lookup of it.
Expand Down

0 comments on commit 3b1fe55

Please sign in to comment.