diff --git a/src/global.c b/src/global.c
index 29b9b30..fe4bf75 100644
a
|
b
|
|
609 | 609 | /* store a :multi sub */ |
610 | 610 | if (!PMC_IS_NULL(PMC_sub(sub)->multi_signature)) |
611 | 611 | store_sub_in_multi(interp, sub, ns); |
612 | | /* store other subs (as long as they're not :anon) */ |
613 | | else if (!(PObj_get_FLAGS(sub) & SUB_FLAG_PF_ANON)) { |
| 612 | /* store other subs (as long as they're not :anon, but the namespace will |
| 613 | * detect that) */ |
| 614 | else { |
614 | 615 | STRING * const name = PMC_sub(sub)->name; |
615 | 616 | PMC * const nsname = PMC_sub(sub)->namespace_name; |
616 | 617 | |
diff --git a/t/compilers/imcc/syn/sub.t b/t/compilers/imcc/syn/sub.t
new file mode 100644
index 0000000..91bc06e
a
|
b
|
|
| 1 | #!perl |
| 2 | # Copyright (C) 2005, The Perl Foundation. |
| 3 | # $Id$ |
| 4 | |
| 5 | use strict; |
| 6 | use warnings; |
| 7 | use lib qw( . lib ../lib ../../lib ); |
| 8 | use Parrot::Test tests => 1; |
| 9 | |
| 10 | ############################## |
| 11 | |
| 12 | pir_output_is( <<'CODE', <<'OUTPUT', ":anon :vtable should work" ); |
| 13 | .sub main :main |
| 14 | $P0 = newclass "Foo" |
| 15 | $P0 = new "Foo" |
| 16 | $I0 = $P0 |
| 17 | $S0 = $I0 |
| 18 | say $S0 |
| 19 | .end |
| 20 | |
| 21 | .namespace ["Foo"] |
| 22 | |
| 23 | .sub get_integer :vtable :anon |
| 24 | .return (42) |
| 25 | .end |
| 26 | CODE |
| 27 | 42 |
| 28 | OUTPUT |
| 29 | |
| 30 | |
| 31 | # Local Variables: |
| 32 | # mode: cperl |
| 33 | # cperl-indent-level: 4 |
| 34 | # fill-column: 100 |
| 35 | # End: |
| 36 | # vim: expandtab shiftwidth=4: |