Author: coke
Date: Tue Jul 22 12:38:10 2008
New Revision: 29684
Modified:
trunk/t/compilers/imcc/syn/hll.t
Log:
[HLL] Objects also work fine for .slurpy pmc HLL mappings now.
but you have to make sure they're actually defined when you try to do the
mapping, so use an :immediate sub to make sure of it. (tene++)
Modified: trunk/t/compilers/imcc/syn/hll.t
==============================================================================
--- trunk/t/compilers/imcc/syn/hll.t (original)
+++ trunk/t/compilers/imcc/syn/hll.t Tue Jul 22 12:38:10 2008
@@ -7,7 +7,7 @@
use lib qw( . lib ../lib ../../lib );
use Test::More;
-use Parrot::Test tests => 1;
+use Parrot::Test tests => 2;
pir_output_is( <<'CODE', <<'OUT', ".param :slurpy (using PMC)" );
@@ -31,3 +31,30 @@
3
ResizableStringArray
OUT
+
+pir_output_is( <<'CODE', <<'OUT', ".param :slurpy (using object)" );
+
+.sub setup :anon :immediate
+ $P0 = subclass 'ResizablePMCArray', 'Stack'
+.end
+
+.HLL 'misc', ''
+.HLL_map 'ResizablePMCArray', 'Stack'
+
+.sub main :main
+ elm('a','b','c')
+.end
+
+.sub elm
+ .param pmc args :slurpy
+
+ $I1 = elements args
+ say $I1
+
+ $S0 = typeof args
+ say $S0
+.end
+CODE
+3
+Stack
+OUT