On Mon, 7 Oct 2019 09:51:47 -0400 Ryan Joseph <generic...@gmail.com> wrote:
> Right now this gives an error because you can’t add normal functions > AFTER generic functions with the same name in the same scope. I can’t > find the bug report but I think Sven fixed this recently or gave a > better error at least. I see. >[...] > That bug aside the rule is that non-generic overloads always win over > generics. I remember this was discussed at length if we can find the > old thread. Note that in Delphi the "non-generic-wins" rule is per parameter: procedure Run<T>(a:T; b: word); procedure Run<T>(a: word; b: T); Run(1,word(2)); // calls first Run(word(1),2); // calls second Run(1,2); // Error: ambiguous Run(word(1),word(2)); // Error: ambiguous Mattias _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal