proc a(i: int): string =
return "i"
proc a(i: int): int =
return i
echo "test"
var j: int
j = a(0)
#echo a(0)
rr.nim(11, 6) Error: ambiguous call; both rr.a(i: int) and rr.a(i: int) match for: (int literal(0))
I do understand that "echo a(0)" is ambiguous, but why is "j = a(0)". Why are these two procs allowed at all when they can not be used? (I guess my GTK wrapper may have a few of these problems, I discovered one yesterday.)
Nim doesn't have return type overloading.
See:
http://stackoverflow.com/questions/442026/function-overloading-by-return-type (general)