Skip Menu |
Report information
Id: 125732
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: bri [at] abrij.org
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



From: bri <bri [...] abrij.org>
To: rakudobug [...] perl.org
Subject: Subsignatures of a capture param not used to sort MMD candidates
Date: Fri, 31 Jul 2015 22:08:57 -0400
Download (untitled) / with headers
text/plain 664b
# The following should all have the same result: $ perl6 -e 'multi a ($x) { 41.say }; multi a (@a) { 42.say; nextsame }; a([1,2]);' 42 41 $ perl6 -e 'multi a (|c($x)) { 41.say }; multi a (|c(@a)) { 42.say; nextsame }; a([1,2]);' 41 $ perl6 -e 'multi a ($a) { 41.say }; multi a (Int $a) { 42.say; nextsame }; a(3);' 42 41 $ perl6 -e 'multi a (|c($a)) { 41.say }; multi a (|c(Int $a)) { 42.say; nextsame }; a(3);' 41 ...actual binding failures will make such MMDs work, only preferential binding is not working. Tests are already in the new S06-multi/signature.t file (but it needs to be added to spectest.data.) I'll label them once I have an RT # for them,
Still reproducible (2017.11,HEAD(e5b660e))

On 2015-07-31 19:09:17, bri@abrij.org wrote:
Show quoted text
>
> # The following should all have the same result:
>
> $ perl6 -e 'multi a ($x) { 41.say }; multi a (@a) { 42.say; nextsame
> }; a([1,2]);'
> 42
> 41
> $ perl6 -e 'multi a (|c($x)) { 41.say }; multi a (|c(@a)) { 42.say;
> nextsame }; a([1,2]);'
> 41
>
>
> $ perl6 -e 'multi a ($a) { 41.say }; multi a (Int $a) { 42.say;
> nextsame }; a(3);'
> 42
> 41
> $ perl6 -e 'multi a (|c($a)) { 41.say }; multi a (|c(Int $a)) {
> 42.say; nextsame }; a(3);'
> 41
>
> ...actual binding failures will make such MMDs work, only preferential
> binding
> is not working.
>
> Tests are already in the new S06-multi/signature.t file (but it needs
> to be added to spectest.data.) I'll label them once I have an RT #
> for them,




This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org