From fa40403b87b1e4dc96f8183638618ff61a0a950b Mon Sep 17 00:00:00 2001 From: jnthn Date: Wed, 9 Sep 2015 15:38:51 +0200 Subject: [PATCH] Have multi-dispatch ignore nameds after ;;. 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. --- src/Perl6/Metamodel/BOOTSTRAP.nqp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Perl6/Metamodel/BOOTSTRAP.nqp b/src/Perl6/Metamodel/BOOTSTRAP.nqp index fecd02ab09e..adb0bf329ea 100644 --- a/src/Perl6/Metamodel/BOOTSTRAP.nqp +++ b/src/Perl6/Metamodel/BOOTSTRAP.nqp @@ -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 := nqp::atpos($named_names, 0); + if $flags +& $SIG_ELEM_MULTI_INVOCANT { + unless $flags +& $SIG_ELEM_IS_OPTIONAL { + if nqp::elems($named_names) == 1 { + %info := nqp::atpos($named_names, 0); + } } + %info := 1; } - %info := 1; next; }