find_method
bsdz
blairuk at googlemail.com
Wed Apr 22 07:10:01 UTC 2009
On 22 Apr, 08:02, chromatic <chroma... at wgz.org> wrote:
> Vtable entries aren't methods. This may be a source of some of your
> confusion.
Don't worry I know the difference between vtables and methods. At
least, it is becoming clearer.
I am trying to hunt down the bug here: -
.sub '' :main
.local pmc cint, cfooint
cfooint = subclass 'Integer', 'FooInt'
$P0 = new 'Integer'
$P0 = 10
sub $P0, 1
say $P0
$P0 = new 'FooInt'
$P0 = 10
sub $P0, 1
say $P0
.end
The sub on the FooInt uses a vtable not a method. So bizarrely we get
an error: -
Multiple Dispatch: No suitable candidate found for 'i_subtract_int',
with signature 'PI'
So find_method doesn't seem to look vtables for derived types whereas
it does for base types.
More information about the parrot-dev
mailing list