If you try to call a sub with a :slurpy parameter and give it a :flat
argument, parrot r10337 just hangs, chewing up CPU time. I know this
worked as of r10161, if it helps. Suprisingly, there isn't already a
test case for this. TIA,
-- Bob Rogers
http://rgrjr.dyndns.org/
Index: t/op/calling.t
===================================================================
--- t/op/calling.t (revision 10337)
+++ t/op/calling.t (working copy)
@@ -1106,6 +1106,24 @@
ok 2
OUTPUT
+pir_output_is(<<'CODE', <<'OUTPUT', "call :slurpy with :flat");
+.sub _fn1
+ .param pmc rest_arg :slurpy
+ print "[in _fn1]\n"
+ print rest_arg
+ print "\n"
+.end
+.sub main :main
+ $P34 = new PerlArray
+ $P34 = 0
+ ## normal flattening direct call, non-slurpy returns
+ $P35 = _fn1($P34 :flat)
+.end
+CODE
+[in _fn1]
+0
+OUTPUT
+
pir_output_is(<<'CODE', <<'OUTPUT', "tailcall to NCI");
.sub main :main
.local pmc s
@@ -1425,5 +1443,5 @@
## remember to change the number of tests :-)
-BEGIN { plan tests => 52; }
+BEGIN { plan tests => 53; }