Ambiguous call when overloading var and non-var with generic type #4519

Closed
ephja opened this Issue Jul 26, 2016 · 0 comments

Projects

None yet

2 participants

@ephja
Contributor
ephja commented Jul 26, 2016
type T[U] = object
proc p(i: T) = discard
proc p(i: var T) = discard
let t1 = T[int]()
p(t1)
var t2 = T[int]()
p(t2) # test.nim(7, 2) Error: ambiguous call; both test.p(i: T) and test.p(i: var T) match for: (T[system.int])
@Araq Araq added the High Priority label Oct 21, 2016
@Araq Araq added a commit that closed this issue Dec 25, 2016
@Araq Araq fixes #4519 e182873
@Araq Araq closed this in e182873 Dec 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment