Skip to content

Commit

Permalink
Have multi-dispatch ignore nameds after ;;.
Browse files Browse the repository at this point in the history
Normally nameds require a bindability check be performed; sometimes we
don't care for that. ;; is the natural "please ignore this" indicator
to the multi-dispatcher.
  • Loading branch information
jnthn committed Sep 9, 2015
1 parent ae65104 commit fa40403
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Perl6/Metamodel/BOOTSTRAP.nqp
Expand Up @@ -1811,12 +1811,14 @@ BEGIN {
my int $flags := nqp::getattr_i($param, Parameter, '$!flags');
my $named_names := nqp::getattr($param, Parameter, '$!named_names');
unless nqp::isnull($named_names) {
if !($flags +& $SIG_ELEM_IS_OPTIONAL) {
if nqp::elems($named_names) == 1 {
%info<req_named> := nqp::atpos($named_names, 0);
if $flags +& $SIG_ELEM_MULTI_INVOCANT {
unless $flags +& $SIG_ELEM_IS_OPTIONAL {
if nqp::elems($named_names) == 1 {
%info<req_named> := nqp::atpos($named_names, 0);
}
}
%info<bind_check> := 1;
}
%info<bind_check> := 1;
next;
}

Expand Down

0 comments on commit fa40403

Please sign in to comment.