-
Notifications
You must be signed in to change notification settings - Fork 1
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
is default(…) does not explain that the value should be known at compile time #3381
Comments
From @perlpilot19:30 <PerlJam> m: my %h is default(%h<foo>); # surely this is a bug? |
From @usev6Since rakudo commit 3754356d8e this fails with X::Syntax::Variable::Initializer: $ perl6 -e 'my %h = %h; say %h' I added a test with commit Raku/roast@a254a271ba I'm closing this ticket as 'resolved'. |
1 similar comment
From @usev6Since rakudo commit 3754356d8e this fails with X::Syntax::Variable::Initializer: $ perl6 -e 'my %h = %h; say %h' I added a test with commit Raku/roast@a254a271ba I'm closing this ticket as 'resolved'. |
@usev6 - Status changed from 'new' to 'resolved' |
From @AlexDanielAlright, I'm reopening this. The error message is indeed LTA, it should clearly indicate that the value needs to be known *at compile time*, and perhaps it can somehow explain why %h is not known to be declared at that point. The new error message doesn't really resolve the issue. In fact, it is arguably even more confusing. However, the whole idea of using %h<foo> as the default value is not going to work any time soon. It has to be a fixed value that should be known at compile-time. It's not just that %h<foo> doesn't work, anything else is not going to work also (e.g. %someotherhash<foo>). Well, unless you do something like ï½¢BEGIN my %z; BEGIN %z<foo> = 42ï½£, which is clearly not what was required. As I'm committing to revert the results of RT #125371 (which I wholeheartedly believe was a wrong move), the original behavior of ï½¢is default(…)ï½£ will be restored. On 2015-10-28 14:46:32, bartolin@gmx.de wrote:
|
@AlexDaniel - Status changed from 'resolved' to 'open' |
Migrated from rt.perl.org#121807 (status was 'open')
Searchable as RT121807$
The text was updated successfully, but these errors were encountered: