Skip to content

Commit

Permalink
Look harder for existing *%_ or | pre-autogen.
Browse files Browse the repository at this point in the history
Fixes RT #125513.
  • Loading branch information
jnthn committed Jul 9, 2015
1 parent a51ac08 commit 341f6e5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Perl6/World.nqp
Expand Up @@ -1544,7 +1544,7 @@ class Perl6::World is HLL::World {
is_multi_invocant => 1
));
}
unless @params[+@params - 1]<named_slurpy> || @params[+@params - 1]<is_capture> {
unless has_named_slurpy_or_capture(@params) {
unless nqp::can($*PACKAGE.HOW, 'hidden') && $*PACKAGE.HOW.hidden($*PACKAGE) {
@params.push(hash(
variable_name => '%_',
Expand Down Expand Up @@ -1641,6 +1641,13 @@ class Perl6::World is HLL::World {
self.create_signature(%signature_info)
}

sub has_named_slurpy_or_capture(@params) {
for @params {
return 1 if $_<named_slurpy> || $_<is_capture>;
}
0
}

# Creates a signature object from a set of parameters.
method create_signature(%signature_info) {
# Create signature object now.
Expand Down

0 comments on commit 341f6e5

Please sign in to comment.