Permalink
Browse files

Fix bad interaction between anonymous parameters and inlining.

  • Loading branch information...
1 parent 34c0d41 commit ec32d8568f559e5926e4e5f0a054449d32035f01 @jnthn jnthn committed Oct 2, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/Perl6/Actions.pm
View
@@ -1494,13 +1494,15 @@ class Perl6::Actions is HLL::Actions {
# Ensure all parameters are simple and build information about them.
my %arg_pos;
my %arg_used;
+ my $arg_num := 0;
for @params {
return 0 if $_<optional> || $_<is_capture> || $_<pos_slurpy> ||
$_<named_slurpy> || $_<pos_lol> || $_<bind_attr> ||
$_<bind_accessor> || $_<nominal_generic> || $_<named_names> ||
$_<type_captures> || $_<post_constraints>;
- %arg_pos{$_<variable_name>} := +%arg_pos;
+ %arg_pos{$_<variable_name>} := $arg_num;
%arg_used{$_<variable_name>} := 0;
+ $arg_num := $arg_num + 1;
}
# Ensure nothing extra is declared.

0 comments on commit ec32d85

Please sign in to comment.