Hi, one can not use the same method name in two different namespaces, if they have the same number of arguments. Please have a look at the attached patch for an example.
jens
Index: t/pmc/object-meths.t =================================================================== RCS file: /cvs/public/parrot/t/pmc/object-meths.t,v retrieving revision 1.15 diff -u -w -r1.15 object-meths.t --- t/pmc/object-meths.t 4 Apr 2004 08:30:44 -0000 1.15 +++ t/pmc/object-meths.t 8 Apr 2004 19:32:22 -0000 @@ -16,7 +16,7 @@ =cut -use Parrot::Test tests => 17; +use Parrot::Test tests => 18; use Test::More; output_like(<<'CODE', <<'OUTPUT', "callmethod - unknown method"); @@ -604,3 +604,28 @@ OUTPUT }; +output_is(<<'CODE', <<'OUTPUT', "same method name in two namespaces"); +##PIR## +.namespace ["A"] +.sub foo method + .param int i + + .pcc_begin_return + .pcc_end_return +.end + +.namespace ["B"] +.sub foo method + .param int i + + .pcc_begin_return + .pcc_end_return +.end + +.namespace [""] +.sub _main @MAIN + print "ok\n" +.end +CODE +ok +OUTPUT