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

ArrayIndexOutOfBoundsException when macro quasi refers to outer variable #3305

Open
p6rt opened this issue Jan 4, 2014 · 2 comments
Open
Labels
JVM Related to Rakudo-JVM

Comments

@p6rt
Copy link

p6rt commented Jan 4, 2014

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

Searchable as RT120927$

@p6rt
Copy link
Author

p6rt commented Jan 4, 2014

From @masak

<masak> r​: my %h; macro attr($key, $val) { quasi { %h{ {{{$key}}} } =
{{{$val}}} } }; macro diag { quasi { say %h<x> } }; attr("x", "OH
HAI"); diag;
<camelia> rakudo-jvm e32249​: OUTPUT«java.lang.ArrayIndexOutOfBoundsException␤␤»
<camelia> ..rakudo-parrot e32249​: OUTPUT«OH HAI␤»
* masak submits rakudobug about Rakudo JVM AIOOBE-ing
<masak> j​: macro id($c) { quasi { {{{$c}}} } }; say id "alive"
<camelia> rakudo-jvm e32249​: OUTPUT«alive␤»
<masak> j​: my %h; macro st($c) { quasi { %h<foo> = {{{$c}}} } }; say st "alive"
<camelia> rakudo-jvm e32249​: OUTPUT«java.lang.ArrayIndexOutOfBoundsException␤␤»
<masak> ok, it's the %h
<masak> j​: my $v; macro st($c) { quasi { $v = {{{$c}}} } }; say st "alive"
<camelia> rakudo-jvm e32249​: OUTPUT«java.lang.ArrayIndexOutOfBoundsException␤␤»
<masak> or any variable, for that matter.
<masak> probably some OUTER not set up correctly.

@p6rt
Copy link
Author

p6rt commented Apr 26, 2016

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

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

No branches or pull requests

1 participant