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
where clause thunk's return value used for smartmatching #6212
Comments
From @zoffixznetI expected these two forms to behave the same: <Zoffix_> m: my $ where .so && .name = sub foo {} However, it looks like in the thunk form, the return value of the thunk is then smart matched against the original value. |
From @zoffixznetOn Sun, 30 Apr 2017 17:11:08 -0700, cpan@zoffix.com wrote:
Well, I fixed this bug!.... and then realized it's not even a bug. The behaviour without the block is correct: when checking, the thunk calls .so and then .name, and the return value of that gets smartmatched agains. This is the same as what we do with `when` clauses. The correct way to write that would be to use `&`. |
@zoffixznet - Status changed from 'new' to 'rejected' |
From @zoffixznetOn Sun, 30 Apr 2017 18:47:16 -0700, cpan@zoffix.com wrote:
And .so on .name |
From 1parrota@gmail.comIf Zoffix gets this confused, maybe the explanation needs some work On 4/30/17, Zoffix Znet via RT <perl6-bugs-followup@perl.org> wrote:
|
From @zoffixznetOn Mon, 01 May 2017 10:15:03 -0700, 1parrota@gmail.com wrote:
Added a note to docs in Raku/doc@80165120fe |
Migrated from rt.perl.org#131239 (status was 'rejected')
Searchable as RT131239$
The text was updated successfully, but these errors were encountered: