# New Ticket Created by  chromatic 
# Please include the string:  [perl #57310]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=57310 >


>From masak in IRC today:

        class A {}; say A.new
        <polyglotbot> OUTPUT[get_string() not implemented in class 'A'

The attached patch fixes that, but it doesn't work yet due to some sneaky 
inheritance in P6Object.  This has to wait on changes to vtable declaration 
and identification.

-- c

=== languages/perl6/src/classes/Object.pir
==================================================================
--- languages/perl6/src/classes/Object.pir	(revision 29799)
+++ languages/perl6/src/classes/Object.pir	(local)
@@ -87,6 +87,18 @@
     .return $P0.'hash'()
 .end
 
+.sub 'get_string' :vtable :method
+    .local string what
+    what  = self.'WHAT'()
+
+    .local string name
+    name  = '<obj:'
+    name .= what
+    name .= '>'
+
+    .return( name )
+.end
+
 =item item()
 
 Return the scalar component of the invocant.  For most objects,

Reply via email to