Open
Description
Example
test.nim
:
import test2
discard O[int](data: 10) == O[int](data: 10)
test2.nim
:
type
O*[T] = object
data*: T
func `==`*[T, U: O](a: T, b: U): bool =
when T is U:
system.`==`(a, b)
else:
false
Actual Output
test.nim(3, 26) Error: ambiguous call; both system.==(x: T: tuple or object, y: T: tuple or object) [proc declared in nimskull/0.1.0-dev.21458/lib/system.nim(1811, 6)] and test2.==(a: T: O, b: U: O) [func declared in test2.nim(5, 6)] match for: (O[system.int], O[system.int])
Expected Output
Should compile and use test2.`==`