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
sink context consumes Seq generated by mutator method #5483
Comments
From @usev6There are failing (skipped) tests for rakudo-j in S32-list/unique.t and S32-list/repeated.t that fail with 'This Seq has already been iterated, and its values consumed'. An example: $ ./perl6-j -e 'my $a = <b b>; $a .= unique; say $a.perl' As far as I understand, the problem happens because calling the mutator method with '$a .= unique' is executed in sink context. If I wrap that code in nqp::stmts to avoid sinking it works as expected: $ ./perl6-j -e 'use nqp; my $a = <b b>; nqp::stmts($a .= unique); say $a.perl' I took a look at the implementation of 'p6sink' for JVM and MoarVM and both implementations are calling method sink -- but maybe rakudo-m does not call it directly on the Seq? |
From @usev6On Sun Jul 24 01:22:23 2016, bartolin@gmx.de wrote:
Now, this is interesting. The first evaluations works now. Probably it got fixed by one of TimToady++'s recent sink related commits. $ ./perl6-j -e 'my $a = <b b>; $a .= unique; say $a.perl' But there is another version of that code, that still produces a consumed Seq: $ ./perl6-j -e 'my $a = <b b>; $a.=unique; say $a.perl' Looks like '$a.=unique' is parsed differently than '$a .= unique'. (Something with 'dotty' instead of 'infix: .='.) |
@usev6 - Status changed from 'new' to 'open' |
From @usev6The latter example works now as well: $ ./perl6-j -e 'my $a = <b b>; $a.=unique; say $a.perl' I've unfudged the skipped tests for this issue and I'm closing this ticket as 'resolved'. |
@usev6 - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#128720 (status was 'resolved')
Searchable as RT128720$
The text was updated successfully, but these errors were encountered: