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
coercive type constraint for variable inconsistently accepted #4558
Comments
From zefram@fysh.orgA coercive type constraint is not permitted on a variable: $ ./perl6 -e 'my Int() $a; say 1' But it *is* accepted if expressed in "of" form: $ ./perl6 -e 'my $a of Int(); say 1' But it doesn't actually work: $ ./perl6 -e 'my $a of Int(); $a = 3; say $a' Presumably it should be forbidden in the "of" form just as it is forbidden -zefram |
From @AlexDanielStill reproducible (2017.11,HEAD(e5b660e)) On 2015-09-19 11:15:43, zefram@fysh.org wrote:
|
The RT System itself - Status changed from 'new' to 'open' |
If I'm not mistaken, coercive type constraints for variables do work now. (Fixed by @vrurg in the context of Raku/problem-solving#227.)
We have a very similar test in roast: https://github.com/Raku/roast/blob/2b556e0aac/S12-coercion/coercion-types.t#L68-L75 (unfudged with Raku/roast@4718d3e1ef, was skipped before). That test uses Tagging 'testneeded' |
This case is already covered by S12-coercion/coercion-types.t. It's ok to close the issue. |
Migrated from rt.perl.org#126111 (status was 'open')
Searchable as RT126111$
The text was updated successfully, but these errors were encountered: