Skip Menu |
Report information
Id: 130565
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: brad <b2gills [at] gmail.com>
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: cross operator doesn't always thunk left side where it should
Download (untitled) / with headers
text/plain 865b
say Bool.pick Xxx ^5 will only ever output one of these two results (() (True) (True True) (True True True) (True True True True)) (() (False) (False False) (False False False) (False False False False)) If you place the left side in a list it does work say (Bool.pick,) Xxx ^5 (() (True) (False True) (False True False) (True True False True)) First came to my attention with this commit https://github.com/rakudo/rakudo/commit/a26f51361b As far as I know it has never worked though The infix:<xx> operator has a thunky of 't.', and that code in the commit is looking for a thunky of '.t' or '.b' etc infix:<&&> has a thunky of '.t' and infix:<xor> has a thunky of '.b' A proper test would be something like the following my $count = 0; is-deeply ($count++ Xxx ^5).list, ((),(0,),(1,2),(3,4,5),(6,7,8,9)); is $count, 10;
Download (untitled) / with headers
text/plain 150b
Also observable with ||: ➜ say <0 0 0 0 0 0 0> X|| $++; (0 0 0 0 0 0 0) ➜ say <0 0 0 0 0 0 0> X|| ($++,); (0 1 2 3 4 5 6)


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org