petdance/scratch — Issue #95: heredocs in a macro argument broken.
Author: petdance
Created: 2011-11-01 05:29:50+00:00
State: open
Labels: bug, core, Pri-normal, Sev-medium

{{{
.macro qq(code)
.code
.endm

.sub main :main
say 'hi'

say <<'FOO'
hi
FOO

.qq({
say "hi"
})

=for FAIL
.qq({
say <<"FOO"
hi
FOO
})

=cut

.end

}}}

If you remove the pod comments, you get:
{{{
parrot foo.pir
error:imcc:The opcode 'say' (say<0>) was not found. Check the type and number of the arguments in macro '.qq' line 3 included from 'foo.pir' line 1
}}}

I'd expect non-POD'd version to print out 'hi' 4 times (modulo whitespace)

Trac ID #899