You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Migrated from rt.perl.org#132089 (status was 'new')
Searchable as RT132089$
The text was updated successfully, but these errors were encountered: