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 andthen B orelse C leaks some internal Block #5783
Comments
From @LLFourn15:18 < llfourn_> m: say (Str andthen .uc orelse "foo") # more golfed unless I totally missed what these are meant to do a Block is not what |
From @zoffixznetOn Sun, 06 Nov 2016 20:25:50 -0800, lloyd.fourn@gmail.com wrote:
The issue is due to `andthen` (and `notandthen`) actually returning Empty instead of the advertized "first undefined value" and since Empty is a Slip, it causes an issue with `orelse`. While the fix is trivial, it causes fallout with `with` operator and right now we're waiting for TimToady to chime in on how things should be done. IRC conversation: https://irclog.perlgeek.de/perl6-dev/2016-11-09#i_13539174 |
The RT System itself - Status changed from 'new' to 'open' |
From @LLFournThanks for the update. As viki hinted at, isn't this a bug in itself say (Empty orelse "foo") -> ;; $_ is raw { #`(Block|140421623865904) ... } Where as say (Any orelse "foo") returns the correct value. On Thu, Nov 10, 2016 at 1:51 AM Zoffix Znet via RT <
|
From @zoffixznetEmpty isn't passed as an arg. It's just an empty slip that gets flattened, so `orelse` ends up with a single block as the arg (the thunked "foo"), which gets returned. I don't know whether it should be evaluated first. On Wed, 09 Nov 2016 15:52:35 -0800, lloyd.fourn@gmail.com wrote:
|
From @zoffixznetReply from TimToady: https://irclog.perlgeek.de/perl6-dev/2016-11-11#i_13550043 I need to think a bit about this behaviour and maybe simply evaluating the thunk before returning it will fix the issues. |
From @zoffixznetOn Sun, 06 Nov 2016 20:25:50 -0800, lloyd.fourn@gmail.com wrote:
Thank you for the report. This is now fixed. Fix: rakudo/rakudo@287af6a37e00ad |
@zoffixznet - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#130034 (status was 'resolved')
Searchable as RT130034$
The text was updated successfully, but these errors were encountered: