#1296: :vtable is ignored when :anon
-------------------------------------------+--------------------------------
Reporter: Bram Geron <bge...@…> | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: none | Version:
Severity: medium | Keywords:
Lang: | Patch:
Platform: |
-------------------------------------------+--------------------------------
:vtable subs are not stored in the vtable slot of a namespace when :anon
is set. This is because :anon blocks the sub from reaching the namespace:
src/global.c: (Parrot_store_sub_in_namespace)
613 else if (!(PObj_get_FLAGS(sub) & SUB_FLAG_PF_ANON)) {
... ...
617 Parrot_store_global_n(interp, ns, name, sub);
Parrot_store_global_n calls namespace->set_pmc_keyed_str, which also
checks if subs are :anon, so the check in Parrot_store_sub_in_namespace
seems to be unnecessary. If we remove it, :vtable :anon works.
This patch removes the check in Parrot_store_sub_in_namespace, and
there's a test too. Created t/compilers/imcc/syn/sub.t for that.
src/global.c | 5 +++--
t/compilers/imcc/syn/sub.t | 36 ++++++++++++++++++++++++++++++++++++
2 files changed, 39 insertions(+), 2 deletions(-)
--
Bram Geron | GPG 0xE7B9E65E
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/1296>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets