New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
positional attributes initialized via .new are assigned as a list (with flattening) instead of bound #3670
Comments
From @raydiakRelevant snippets starting at http://irclog.perlgeek.de/perl6/2015-02-08#i_10078888 : 05:59:49 raydiak | m: class Foo { has @.bar }; Foo.new: :bar(1,2,3); Foo.new(bar => (1,2,3)); Foo.new: bar => [1,2,3]; # <-- fil__ |
From @jnthnOn Sun Feb 08 01:22:03 2015, raydiak@cyberuniverses.com wrote:
These days, that 3 is correct, because after the GLR [1,2,3] is no longer an item and assignment follows the 1-arg rule. There was still a bug, however; this gave 3: class Foo { has @.bar }; say Foo.new( bar => $[1,2,3] ).bar.elems When it should have given 1. I've fixed that, and added tests in S12-attributes/instance.t. |
The RT System itself - Status changed from 'new' to 'open' |
@jnthn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#123757 (status was 'resolved')
Searchable as RT123757$
The text was updated successfully, but these errors were encountered: