I am confused about how we should setup method signatures:

Let's take a look at a line in any-str.pir:

 46 .sub 'comb' :method :multi(_)
 47     .param pmc regex
 48     .param int count        :optional
 49     .param int has_count    :opt_flag

As you can see we have one parameter specified in :multi which is _ (any
type). However we also have two .param lines, 47 and 48. So here are some
questions:

I noticed 'self' is implicitly defined, however does 'self' eat up a
parameter? Should we always have one parameter in :multi specified for the
object the method is running on?

Also, I played around with :multi by putting in different things. With the
above method here is what I tried and the result

:multi(_) - works
:multi(_, _) works
:multi(_,_,_) doesn't work
:multi(_,Integer) doesn't work
:mult(Sub) doesn't work

Some clarification surrounding the use of :multi would help a lot.

Best Regards,
-Chris Davaz

Reply via email to