Patrick R.Michaud (via RT) wrote:
The new :vtable pragma doesn't seem to work when used on methods
of subclasses of core classes. Here's a quick sample
(I'm also adding this test to t/pmc/parrotobject.t):
$ cat vt.pir
.sub main :main
$P0 = subclass 'Hash', 'Foo'
$P0 = subclass 'Hash', 'Bar'
$P1 = new 'Foo'
$S1 = $P1
say $S1
$P1 = new 'Bar'
$S1 = $P1
say $S1
.end
.namespace [ 'Foo' ]
.sub '__get_string' :method
.return('Hello world')
.end
.namespace [ 'Bar' ]
.sub 'get_string' :method :vtable
.return('Hello world')
.end
$ ./parrot vt.pir
Hello world
Hash[0x7d8378]
$
The two output lines should be identical ("Hello world").
Thanks!
Pm