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

Lexical lookup doesn't work properly from an END block to a surrounding BEGIN block in Rakudo #2674

Closed
p6rt opened this issue Mar 14, 2012 · 4 comments

Comments

@p6rt
Copy link

p6rt commented Mar 14, 2012

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

Searchable as RT111766$

@p6rt
Copy link
Author

p6rt commented Mar 14, 2012

From @masak

<masak> nom​: BEGIN { my $a = 42; END { say $a } }
<p6eval> rakudo fee891​: OUTPUT«Any()␤»
* masak submits rakudobug
<masak> nom​: my $a = 42; END { say $a }
<p6eval> rakudo fee891​: OUTPUT«42␤»
<masak> both should work, IMNSHO.

@p6rt
Copy link
Author

p6rt commented Oct 23, 2014

From @usev6

This works now (output is identical on Moar, Parrot and JVM)​:

$ perl6 -e 'my $a = 42; END { say $a }'
42

$ perl6 -e 'BEGIN { my $a = 42; END { say $a } }'
42

I added two tests to S04-phasers/end.t with commit Raku/roast@958f3520e7

I'm closing this ticket now.

1 similar comment
@p6rt
Copy link
Author

p6rt commented Oct 23, 2014

From @usev6

This works now (output is identical on Moar, Parrot and JVM)​:

$ perl6 -e 'my $a = 42; END { say $a }'
42

$ perl6 -e 'BEGIN { my $a = 42; END { say $a } }'
42

I added two tests to S04-phasers/end.t with commit Raku/roast@958f3520e7

I'm closing this ticket now.

@p6rt p6rt closed this as completed Oct 23, 2014
@p6rt
Copy link
Author

p6rt commented Oct 23, 2014

@usev6 - Status changed from 'new' to 'resolved'

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