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

Some phaser blorsts don't see outer $_ #4352

Closed
p6rt opened this issue Jun 26, 2015 · 5 comments
Closed

Some phaser blorsts don't see outer $_ #4352

p6rt opened this issue Jun 26, 2015 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Jun 26, 2015

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

Searchable as RT125488$

@p6rt
Copy link
Author

p6rt commented Jun 26, 2015

From @lizmat

[12​:35​:07] <lizmat> m​: for ^2 { NEXT .say } # feels like a rakudobug
[12​:35​:07] <+camelia> rakudo-moar a15dac​: OUTPUT«Cannot call method 'say' on a null objectâ�¤ in block <unit> at /tmp/gV2l9tWyYZ​:1â�¤â�¤Â»
[12​:35​:32] <lizmat> m​: for ^2 { NEXT $_.say } # same
[12​:35​:32] <+camelia> rakudo-moar a15dac​: OUTPUT«Cannot call method 'say' on a null objectâ�¤ in block <unit> at /tmp/2JExRjB36d​:1â�¤â�¤Â»
[12​:35​:45] <lizmat> m​: for ^2 { .say } # ok
[12​:35​:46] <+camelia> rakudo-moar a15dac​: OUTPUT«0â�¤1â�¤Â»
[12​:35​:54] <lizmat> moritz​: agree ?
[12​:37​:49] <moritz> lizmat​: yes

Same for LAST​:

$ 6 'for ^10 { LAST .say }'
Cannot call method 'say' on a null object

Not for FIRST, LEAVE, PRE, UNDO
$ 6 'for ^1 { FIRST .say }'
0
$ 6 'for ^1 { LEAVE .say }'
0
$ 6 'for ^1 { PRE .say }�
0
$ 6 'for ^1 { UNDO .say }�
0
$ 6 'for ^1 { KEEP .say; 1 }�
0

POST has a different failure mode​:

$ 6 'for ^1 { POST .say }�
Nil

Liz

@p6rt
Copy link
Author

p6rt commented Dec 1, 2017

From @AlexDaniel

This was resolved in (2016-08-03) rakudo/rakudo@5e61516

W4anD0eR96 committed some tests for it​: Raku/roast@48124e0

And then beefed up the tests for other phasers​: Raku/roast@2a3717c

This revealed an issue in KEEP, which is now filed in rakudo/rakudo#1290

Closing.

On 2015-06-26 03​:45​:08, elizabeth wrote​:

[12​:35​:07] <lizmat> m​: for ^2 { NEXT .say } # feels like a
rakudobug
[12​:35​:07] <+camelia> rakudo-moar a15dac​: OUTPUT«Cannot call method
'say' on a null objectâ�¤ in block <unit> at /tmp/gV2l9tWyYZ​:1â�¤â�¤»
[12​:35​:32] <lizmat> m​: for ^2 { NEXT $_.say } # same
[12​:35​:32] <+camelia> rakudo-moar a15dac​: OUTPUT«Cannot call method
'say' on a null objectâ�¤ in block <unit> at /tmp/2JExRjB36d​:1â�¤â�¤»
[12​:35​:45] <lizmat> m​: for ^2 { .say } # ok
[12​:35​:46] <+camelia> rakudo-moar a15dac​: OUTPUT«0â�¤1â�¤»
[12​:35​:54] <lizmat> moritz​: agree ?
[12​:37​:49] <moritz> lizmat​: yes

Same for LAST​:

$ 6 'for ^10 { LAST .say }'
Cannot call method 'say' on a null object

Not for FIRST, LEAVE, PRE, UNDO
$ 6 'for ^1 { FIRST .say }'
0
$ 6 'for ^1 { LEAVE .say }'
0
$ 6 'for ^1 { PRE .say }’
0
$ 6 'for ^1 { UNDO .say }’
0
$ 6 'for ^1 { KEEP .say; 1 }’
0

POST has a different failure mode​:

$ 6 'for ^1 { POST .say }’
Nil

Liz

@p6rt
Copy link
Author

p6rt commented Dec 1, 2017

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

@p6rt
Copy link
Author

p6rt commented Dec 1, 2017

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

@p6rt p6rt closed this as completed Dec 1, 2017
@p6rt
Copy link
Author

p6rt commented Dec 2, 2017

From @tisonkun

So far we've fix the bugs on NEXT and LAST, while POST remained.

I added a test for this ticket perl6/roast#​362

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant