-
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
:D smiley is not respected when assigning to Nil #5253
Comments
From @LLFournm: say my Any:D $a = Nil # (Any:D) that should be an error. |
From @zoffixznetStill present in 405519 <Zoffix> m: say my Any:D $a = Any |
From @skidsrakudo PR #829 should fix this on moarvm. JVM and JS fixes may also be needed. |
The RT System itself - Status changed from 'new' to 'open' |
From @gfldex16:02 < TimToady> I think my Int:D $a = 42 should initialize as soon as possible, and never allow assignment of anything that ~~ Nil 16:10 < TimToady> so when the symbol is introduced, we can temporarily poke an Int:D into it, but as soon as the "my" executes and sets the value the first time, it should never be reset to Int:D except by re-entry |
From @skidsOn Fri Jul 22 15:34:49 2016, bri@abrij.org wrote:
I added some error awesomeization to that PR so that now: $ perl6 -e 'my Int:D @a; @a[0] = Nil; @a.say;' $ perl6 -e 'my Int:D @a; @a[0] = Int:D; @a.say;' $ perl6 -e 'my Int:D $a = 42; $a := Nil; $a.say;' $ perl6 -e 'my Int:D $a = 42; $a := Int:D; $a.say;' And though there is an awesomeization for sub return types it does not work, $ perl6 -e '{ sub f() of Str:D { Str:D }; f(); CATCH { $_.expected.WHAT.say }}' ...that is a separate issue so, not touching it. Another thing I'm not touching is this: $ perl6 -e 'my Int:D %a; %a<a> := Str; %a.say;' ...note how the array version fails (correctly) in the binder: $ perl6 -e 'my Int:D @a; @a[0] := Str; @a.say;' ...and note in Hash.pm there are comments on the hash class BIND-KEY method saying One thing the awesomeized errors do not get right is this, but it is in a half broken, $ perl6 -e 'role A[::T (versus current behavior, also wrong as it should not fail, if ever implemented): (03:31:08 PM) skids: m: role A[::T Evidence that it should not be hoped to work: $ perl6 -e 'role A[::T $t] { method f { (T:D).perl.say } }; A[Int].new.f()' |
From @zoffixznetFixed in rakudo/rakudo@5500404 Tests added in Raku/roast@fa9a6b0 -- |
@zoffixznet - Status changed from 'open' to 'resolved' |
From @LLFournTests: On Mon, Jul 25, 2016 at 8:19 AM Brian S. Julin via RT <
|
Migrated from rt.perl.org#127958 (status was 'resolved')
Searchable as RT127958$
The text was updated successfully, but these errors were encountered: