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

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

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



Subject: [BUG] `state` variables unset if multi candidate uses named params
Download (untitled) / with headers
text/plain 677b
the `state $l` appears to break the moment we add an unrelated named param to it (doesn't happen with positionals): <Zoffix> m: class Foo { multi method foo (Int) { self.foo }; multi method foo(:$foo) { state $l = 42; dd $l} }; Foo.new.foo: 42; <camelia> rakudo-moar f0c3bf: OUTPUT: «Any $l = Any␤» <Zoffix> m: class Foo { multi method foo (Int) { self.foo }; multi method foo() { state $l = 42; dd $l} }; Foo.new.foo: 42; <camelia> rakudo-moar f0c3bf: OUTPUT: «Int $l = 42␤» <Zoffix> m: class Foo { multi method foo (Int) { self.foo: 'meow' }; multi method foo($foo) { state $l = 42; dd $l} }; Foo.new.foo: 42; <camelia> rakudo-moar f0c3bf: OUTPUT: «Int $l = 42␤»


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