but expected one of:
here is the code func $`*(i: Int_b): string = i.lis.mapIt(it.join("")).join("\n")`
For anyone curious for the exact source code, this seems to reproduce the problem:
# lib.nim
type
Int_b* = int64
func `$`*(i: Int_b): string =
"somestring"
# main.nim
import lib
var a: Int_b
echo a
If you make Int_b a distinct int64 - it works, so I'm not 100% sure if this is a bug. I've tried searching existing issues, but nothing similar came up.
If we call $ explicitly, we get a more illuminating error message:
Error: ambiguous call; both dollars.$(x: int64) [proc declared in /path/to/lib/system/dollars.nim(14, 6)] and lib.$(i: Int_b) [func declared in /path/to/lib.nim(3, 6)] match for: (Int_b)