Autrijus wrote:
Personally, I think the only reasonable way of resolving this is to assume (as in the last paragraph above) that function calls in these kinds of indeterminate contexts are always in list context.
So, even if the clash is Num vs Str context, we still run it under List context? Or is it their common ancestor, "Scalar"?
Yes. When I said "indeterminate contexts" I meant List vs Scalar. After all, the whole point of multimethods is to cope polymorphically with Num-vs-Str type clashes.
The dispatch resolution process is described in A12, under "Calling via Multiple Dispatch". It's close to what you describe above, except the "local vs global" distinction is a little more complex, and the final discrimination is via C<is default>, not via C<Code> object creation sequence.
Okay, I'll drop the Code creation order thing and make it raise a
fatal error on ambiguity, then.
But only if there isn't a variant marked C<is default>.
Damian