Ticket #1505 (closed bug: fixed)
:anon vtable overrides don't work in PIR
Reported by: | moritz | Owned by: | whiteknight |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | core | Version: | 2.1.0 |
Severity: | medium | Keywords: | |
Cc: | Language: | perl6 | |
Patch status: | Platform: | linux |
Description
.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
Change History
Note: See
TracTickets for help on using
tickets.