[perl #123506] [JVM] List Comprehension assigned to capture variable is Nil

2016-10-30 Thread Christian Bartolomaeus via RT
This works now as expected:

$ ./perl6-j -e 'my \T = ($_ for ^1); say T'
(0)

ยง ./perl6-j -e 'my \T = ($_ for ^2); say T'
(0 1)

$ ./perl6-j -e 'say ($_ for ^2)'
(0 1)

I added two tests to S04-statements/for.t with commit 
https://github.com/perl6/roast/commit/fc9a4a8523

I'm closing this ticket as 'resolved'.


[perl #123506] [JVM] List Comprehension assigned to capture variable is Nil

2014-12-27 Thread via RT
# New Ticket Created by  Moritz Lenz 
# Please include the string:  [perl #123506]
# in the subject line of all future correspondence about this issue. 
# URL: https://rt.perl.org/Ticket/Display.html?id=123506 


With rakudo-jvm 2014.12:

$ perl6-j -e 'my \T = ($_ for ^1); say T'
Nil
$

Compare this with

$ perl6-j -e 'say ($_ for ^2)'
0 1

and

$ perl6-m -e 'my \T = ($_ for ^2); say T'
0 1

This breaks Digest::MD5.