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
Null PMC Access when blocks get the wrong $_ sometimes in Rakudo #2804
Comments
From @masak<tadzik> r: for Range.new(0, 1) -> $p { when $p { say $_.perl; say $_.path } } |
From @pmichaudNever mind the 'if' example above; it doesn't really evoke the error. This does, however: > $_ = 0; for ^1 -> $p { when $p { say 'matched'; $_.say } } I'm guessing the problem has something to do with the way that 'when' is Pm |
The RT System itself - Status changed from 'new' to 'open' |
From @pmichaud
This guess is wrong; there's currently no topicalization taking So, it's something about the way $_ is being left unset in the when block Pm |
From @masak<zjmarlow> r: my $line; for < one two three >.values -> $line { if True |
From @cokeOne of the nom regressions (S02-magicals/dollar-underscore.t) is caused by 19:12 < [Coke]> r: $_ = 1; my $tracker = ''; for 12 -> $a { if $_ == 1 { -- |
From @FROGGSit only comes if there is a condition within a for-loop with a named <FROGGS> r: $_ = 1; for 12 -> $a { if 1 { "$_" } } <FROGGS> r: $_ = 1; for 12 -> $a { unless 0 { "$_" } } |
The RT System itself - Status changed from 'new' to 'open' |
From @FROGGS$_ is not an SMO: r: for 12 -> $a { if 1 { say $_.WHAT } } |
From @usev6This Null PMC Access error does not occur any longer. Also the SixModelObject error is gone. (Output of following commands is identical for Moar, Parrot and JVM.) $ perl6 -e '$_ = 1; for ^2 -> $p { when $p { say "matched"; $_.say } }' $ perl6-m -e '$_ = 42; for 1 -> $p { if 1 { .say } }' $ perl6 -e 'for 12 -> $a { if 1 { say $_.WHAT } }' I extended the existing tests in S02-magicals/dollar-underscore.t a bit with the following commit: Raku/roast@0e579ae7c7 I'm closing this ticket now. |
1 similar comment
From @usev6This Null PMC Access error does not occur any longer. Also the SixModelObject error is gone. (Output of following commands is identical for Moar, Parrot and JVM.) $ perl6 -e '$_ = 1; for ^2 -> $p { when $p { say "matched"; $_.say } }' $ perl6-m -e '$_ = 42; for 1 -> $p { if 1 { .say } }' $ perl6 -e 'for 12 -> $a { if 1 { say $_.WHAT } }' I extended the existing tests in S02-magicals/dollar-underscore.t a bit with the following commit: Raku/roast@0e579ae7c7 I'm closing this ticket now. |
@usev6 - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#113904 (status was 'resolved')
Searchable as RT113904$
The text was updated successfully, but these errors were encountered: