Hi,

attached is a patch to t/pmc/object-meths.t that adds a test that is currently 
failing because IMCC rejects code like self."blah"()

jens
Index: t/pmc/object-meths.t
===================================================================
RCS file: /cvs/public/parrot/t/pmc/object-meths.t,v
retrieving revision 1.9
diff -u -w -r1.9 object-meths.t
--- t/pmc/object-meths.t	11 Mar 2004 13:17:21 -0000	1.9
+++ t/pmc/object-meths.t	11 Mar 2004 15:29:48 -0000
@@ -16,7 +16,7 @@
 
 =cut
 
-use Parrot::Test tests => 7;
+use Parrot::Test tests => 8;
 use Test::More;
 
 output_like(<<'CODE', <<'OUTPUT', "callmethod - unknown");
@@ -180,4 +180,71 @@
 bar_init
 in sub
 done
+OUTPUT
+
+output_is(<<'CODE', <<'OUTPUT', "methods: self");
+##PIR##
+.sub _main
+    .local pmc A
+    .local pmc B
+    
+    newclass A, "A"
+    newclass B, "B"
+    
+    find_type I0, "A"
+    find_type I1, "B"
+    
+    new A, I0
+    new B, I1
+    
+    setprop A, "B", B
+    
+    A."foo"()
+    B."foo"()
+    
+    end
+.end
+
+.namespace ["A"]
+
+.sub foo method
+    .local pmc B
+    
+    self = P2
+    print "A::foo\n"
+    getprop B, "B", self
+
+    self."blah"()
+    B."blah"()
+    self."blah"()
+    
+    .pcc_begin_return
+    .pcc_end_return
+.end
+
+.sub blah method
+    print "A::blah\n"
+    .pcc_begin_return
+    .pcc_end_return
+.end
+
+.namespace ["B"]
+
+.sub foo method
+    print "B::foo\n"
+    .pcc_begin_return
+    .pcc_end_return
+.end
+
+.sub blah method
+    print "B::blah\n"
+    .pcc_begin_return
+    .pcc_end_return
+.end
+CODE
+A::foo
+A::blah
+B::blah
+A::blah
+B::foo
 OUTPUT

Reply via email to