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

Can't call locally assigned code blocks inside quasis in Rakudo #2958

Open
p6rt opened this issue Nov 5, 2012 · 2 comments
Open

Can't call locally assigned code blocks inside quasis in Rakudo #2958

p6rt opened this issue Nov 5, 2012 · 2 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Nov 5, 2012

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

Searchable as RT115594$

@p6rt
Copy link
Author

p6rt commented Nov 5, 2012

From @masak

<masak> r​: macro foo { quasi { my &bar = { say "OH HAI" }; bar } }; foo
<p6eval> rakudo 64208d​: OUTPUT«===SORRY!===␤CHECK FAILED​:␤Undefined
routine '&bar' called (line 1)␤»
<masak> r​: macro foo { quasi { my &bar = { say "OH HAI" }; &bar() } }; foo
<p6eval> rakudo 64208d​: OUTPUT«Cannot assign into a PMCNULL container [...]
* masak submits rakudobug
<masak> none of this is surprising, of course, since we already know
assignments to locally declared variables don't work properly in quasi
blocks.
<masak> r​: macro foo { quasi { my $bar = "OH HAI"; say $bar } }; foo
<p6eval> rakudo 64208d​: OUTPUT«Cannot assign into a PMCNULL container [...]
<masak> r​: macro foo { quasi { my $bar; say $bar } }; foo
<p6eval> rakudo 64208d​: OUTPUT«Mu()␤»

@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