#1505: :anon vtable overrides don't work in PIR
--------------------+-------------------------------------------------------
Reporter: moritz | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: core | Version: 2.1.0
Severity: medium | Keywords:
Lang: perl6 | Patch:
Platform: linux |
--------------------+-------------------------------------------------------
{{{
.namespace [ 'Foo' ]
.sub '__onload' :anon :init
$P0 = newclass "Foo"
.end
.sub '' :vtable('get_string') :method :anon
.return("works")
.end
.sub main :main
$P0 = new 'Foo'
$S0 = $P0
print $S0
print "\n"
.end
}}}
This prints
{{{
get_string() not implemented in class 'Foo'
current instr.: 'parrot;Foo;main' pc 16 (foo.pir:15)
}}}
but just prints "works" if you remove the :anon.
I know of no good reason why a method that overrides a vtable method has
to have a name.
Currently it prevents us from fixing this bug in Rakudo:
http://rt.perl.org/rt3/Ticket/Display.html?id=73112
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/1505>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets