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
I was about to file a bug but saw this issue. I think I have the same issue, but with normal generic parameters and not static ones:
typeObj[T] =object
b: T
convertertest1[T](a: Obj[T]): T = a.b
procdoStuff(a: int, b: float) =discarddoStuff(Obj[int](b: 1), Obj[float](b: 1.2)) # Error: type mismatch: got <Obj[system.int], Obj[system.float]>
As far as I'm aware this has been an issue forever, just hit it again today. I try very hard not to use converters much because of the bugs and magic, but when I do use them they provide some very nifty functionality.
There was a patch awhile ago that seemed related but didn't fix this specific issue: #9698
With the following code
the first two calls,
p(g1,g2)
andp(f1,f2)
, fail withtype mismatch
complained by the compiler. However, the other calls compile and run fine.The text was updated successfully, but these errors were encountered: