On Mon, May 27, 2013 at 02:55:02PM +0000, Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum wrote:
Yeah, for two non-disjoint types T and U with T<U it should be possible. But it soon turns ugly (see C++ :) when you have multiple parameters...
this for example: variant void foo(int a, mixed b); variant void foo(mixed a, int b);
it will work fine unless it is called with (int, int)
if it is possible to detect these than i think an error would be ok: "types are ambiguous" to force the user to qualify which one of these takes (int, int)
on the other hand: the ambiguity would be gone as soon as variant void foo(int a, int b); is added.