On Mon, Apr 14, 2003 at 11:02:01AM +1000, Damian Conway wrote:
: Paul wrote:
:
: >whoa....
: >
: > multi foo ($me: Int $x) {...}
: > multi foo ($me: Dog $x) {...}
: >
: >doesn't work to delegate by sig? I must've *REALLY* misread something
: >somewhere....
:
: Yep. You missed the bit that says that multimethods only dispatch on their
: invocants (i.e. the parameters declared before the colon). What you wrote
: would probably induce a compile-time error:
:
: Inconsistent declaration of multi foo($me:...)
Actually, the problem is that they're consistent, not inconsistent. Perhaps:
Undifferentiated declarations of multi foo($me:...)
On the other hand, it might just fall into the category of:
Redeclaration of &foo($:) at line 123...
Larry
Thread Previous
|
Thread Next