Skip to content
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

Blockless LAST phaser puts Mu in the iteration variable #4517

Closed
p6rt opened this issue Sep 5, 2015 · 5 comments
Closed

Blockless LAST phaser puts Mu in the iteration variable #4517

p6rt opened this issue Sep 5, 2015 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Sep 5, 2015

Migrated from rt.perl.org#126001 (status was 'resolved')

Searchable as RT126001$

@p6rt
Copy link
Author

p6rt commented Sep 5, 2015

From @moritz

moritz@​hack​:~/p6/rakudo$ ./perl6-m --version
This is perl6 version 2015.07.1-717-ga6bb0ba built on MoarVM version
2015.07-108-g7e9f29e
moritz@​hack​:~/p6/rakudo$ ./perl6-m -e 'for 1, 2 { LAST say $_ }'
(Mu)
moritz@​hack​:~/p6/rakudo$ ./perl6-m -e 'for 1, 2 -> $x { LAST say $x
}'
(Mu)

I expected "2\n" as output both times.

It works when when the phaser has a separate block​:
moritz@​hack​:~/p6/rakudo$ ./perl6-m -e 'for 1, 2 -> $x { LAST { say $x } }'
2

@p6rt
Copy link
Author

p6rt commented Jul 17, 2016

From @usev6

Behaviour for Moar is unchanged. The code works as expected on JVM​:

$ perl6-j -e 'for 1, 2 { LAST say $_ }'
2

I added a test to S04-phasers/in-loop.t with commit Raku/roast@a1c52bacd3

BTW, this ticket looks related to the failing tests from https://rt-archive.perl.org/perl6/Ticket/Display.html?id=121722

@p6rt
Copy link
Author

p6rt commented Jul 17, 2016

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Aug 3, 2016

From @lizmat

This test now passes, can be closed.

On 17 Jul 2016, at 21​:54, Christian Bartolomaeus via RT <perl6-bugs-followup@​perl.org> wrote​:

Behaviour for Moar is unchanged. The code works as expected on JVM​:

$ perl6-j -e 'for 1, 2 { LAST say $_ }'
2

I added a test to S04-phasers/in-loop.t with commit Raku/roast@a1c52bacd3

BTW, this ticket looks related to the failing tests from https://rt-archive.perl.org/perl6/Ticket/Display.html?id=121722

@p6rt
Copy link
Author

p6rt commented Aug 3, 2016

@moritz - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Aug 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant