Nim
Nim copied to clipboard
implicit generics and explicit generics affect overload resolution
The following example works, but it should really be an error for an ambiguous identifier.
Example
template foo(arg: typedesc) =
echo "A"
template foo[T](arg: typedesc[T]) =
echo "B"
foo(int)
Current Output
B
Expected Output
Error: ambiguous identifier: foo