#773: Can't override vtables of a PMC from PIR
---------------------+------------------------------------------------------
 Reporter:  coke     |       Owner:       
     Type:  bug      |      Status:  new  
 Priority:  blocker  |   Milestone:       
Component:  none     |     Version:  1.2.0
 Severity:  medium   |    Keywords:       
     Lang:  tcl      |       Patch:       
 Platform:           |  
---------------------+------------------------------------------------------

Comment(by whiteknight):

 As is my understanding, I don't think this should be supported. This is an
 attempt to redefine an existing VTABLE. I think you probably want a
 subclass like this:

 {{{
 .HLL 'parrot'
 .namespace ['MyString']

 .sub get_string :vtable
   .return('')
 .end

 .namespace []

 .sub foo :main
   $P1 = new 'MyString'
   $P1 = 'not '
   $S0 = $P1
   print $S0
   say "ok 1"
 .end
 }}}

 The only PMC type that checks for overrides is the Object PMC. The String
 PMC doesn't have any facilities to check for them.

-- 
Ticket URL: <https://trac.parrot.org/parrot/ticket/773#comment:1>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets

Reply via email to