Skip Menu |
Report information
Id: 132089
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: cpan [at] zoffix.com
Cc:
AdminCc:

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



Subject: Strange error: "Found named parameter '(unnamed)' twice in signature"
Download (untitled) / with headers
text/plain 1007b
This code throws this error, even though I don't seem to be using two unnamed named params: $ perl6 -e 'role Foo { multi method x(:$x) { "role" } }; class :: does Foo { multi method x(:$) { "class" } }.new.x.say' ===SORRY!=== Error while compiling -e Found named parameter '(unnamed)' twice in signature :(<anon|83252608> $: $, *%_): *%_ vs $ at -e:1 Even thought pretty much any other combination of args or avoiding of role mixing does not have this error: $ perl6 -e 'class Foo { method x(::?CLASS:D: :$) { "class" } }.new.x.say' class $ perl6 -e 'class Foo { method x(:$) { "class" } }.new.x.say' class $ perl6 -e 'class Foo { multi method x(:$) { "class" } }.new.x.say' class $ perl6 -e 'role Foo { multi method x(:$x) { "role" } }; class :: does Foo { multi method x(::?CLASS:D: :$) { "class" } }.new.x.say' class $ perl6 -e 'role Foo { multi method x() { "role" } }; class :: does Foo { multi method x(:$) { "class" } }.new.x.say' class


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