On Tue Mar 10 13:45:27 2009, moritz wrote: > On Sun Mar 01 02:44:17 2009, masak wrote: > > <szabgab> oh and is arity defined on multi subs ? > > <szabgab> rakudo: sub f($z) {}; &f.arity.say > > <p6eval> rakudo af4b73: OUTPUT«1» > > <szabgab> rakudo: multi sub f($z) {}; &f.arity.say > > <p6eval> rakudo af4b73: OUTPUT«Null PMC access in find_method() [...] > > * masak submits rakudobug > > <masak> szabgab++ > > Actually calling *any* method on &f gives the Null PMC access, if f() is > a multi: > > ./perl6 -e 'multi f { ... }; say &f.WHAT' > Null PMC access in find_method() >
Fixed this somewhat. Notes: * .WHAT now reports Multi and this is spectest'd. * .candidates can be called to get the set of candidates. You can then use .signature and .arity on those (.candidates is not quite spec yet, but probably fine and reasonable to go in to the spec - someone has agreed to do that in the next day or so) * .signature and .arity for now are not defined on Multi - it's not spec'd and I'm not so sure exactly what it'd do, though an any junction seems easiest. But maybe better to make people write any(&foo.candidates).signature to get that (this produces an any junction of signatures). See 76b2652. Thanks, Jonathan