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
a constant hash does not coerce its RHS correctly #2682
Comments
From @moritz14:37 < moritz> nom: constant %h = 1, 2; say %h.WHAT should be Hash(), of course 14:37 * moritz submits rakudobug |
From @masak<japhb_> r: constant %foo = ().list; say %foo.perl; |
The RT System itself - Status changed from 'new' to 'open' |
From @diakopter13:08 <diakopter> m: constant %h = 1, 2; say %h.WHAT |
@diakopter - Status changed from 'open' to 'resolved' |
From @moritzOn Thu Apr 07 10:10:22 2016, diakopter wrote:
This is not correct behavior; hash assignment is meant to be coercive, and I see no indication that doing it in a constant is supposed to be any diferent than in a regular my. |
@moritz - Status changed from 'resolved' to 'open' |
From @smlsConstant @ variables behave differently from their `my` counterparts as well: ➜ constant @a = 1..3; Maybe the default types (which assignment coerces to) are supposed to be: | @ | % ...and the `constant %` case just doesn't work correctly yet. It would make sense, because List/Map are the immutable counterparts of Array/Hash. But the design docs don't have much on constants, so I'm just guessing at the original intentions. |
Migrated from rt.perl.org#111944 (status was 'open')
Searchable as RT111944$
The text was updated successfully, but these errors were encountered: