You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
funcfoo(x: int): int= x
funcfoo(x: varint): varint= x
var x =0discardfoo x
But this isn't:
typeFoo=concept foo
funcfoo(x: Foo): Foo= x
funcfoo(x: varFoo): varFoo= x
var x =0discardfoo x
Error: ambiguous call; both inim_1542378399.foo(x: Foo)[declared in inim_1542378399.nim(4, 5)] and inim_1542378399.foo(x: var Foo)[declared in inim_1542378399.nim(5, 5)] match for: (int)
The text was updated successfully, but these errors were encountered:
krux02
changed the title
Unexpected ambiguous call error when using a concept constrained function argument
concept cannot be overloaded with var concept.
Nov 16, 2018
krux02
changed the title
concept cannot be overloaded with var concept.
concept cannot be overloaded with var concept
Nov 16, 2018
So this is valid code:
But this isn't:
The text was updated successfully, but these errors were encountered: