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

Lexicals that are only used within a quasi block do not get lowered into the macro's scope #4236

Open
p6rt opened this issue May 12, 2015 · 2 comments
Labels

Comments

@p6rt
Copy link

p6rt commented May 12, 2015

Migrated from rt.perl.org#125160 (status was 'stalled')

Searchable as RT125160$

@p6rt
Copy link
Author

p6rt commented May 12, 2015

From cygx@cpan.org

The effect can be seen in https://github.com/cygx/p6-debug/blob/f432d76c2eda9ee53eca89f7e5eeee667874cf78/assert.pm6

A probably related issue with slightly differend failure mode is exhibited by the following code snippet​:

  BEGIN my $foo = 42;

  macro bar { quasi { $foo } }
  macro baz { $foo; quasi { $foo } }
  macro quux { my $ = $foo; quasi { $foo } }

  say bar, baz, quux; # => (Mu)(Mu)42

Setting MVM_SPESH_DISABLE=1 and --optimize=off does not help, so the optimizer does not appear to be involved.

@p6rt
Copy link
Author

p6rt commented Apr 26, 2016

@coke - Status changed from 'new' to 'stalled'

@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant