Closed TheSimpleZ closed 3 years ago
Thanks for taking the time to report these issues, I really appreciate it!
There are more cases where the =? operator doesn’t work very well with generics. The problem lies in the fact that the Nim compiler will do a semantic analysis before it evaluates the =? macro. The mixin statement sometimes helps, but often doesn’t.
I’m working on a solution, but it’s not finished yet and will likely involve a change in the syntax of option binding.
Alright! Thanks for the quick responses. I guess I'll have to wait with using this package in generics until then 😄
That shouldn’t take too long, this bug is bothering me 😄
Fixed in 270003831660291f7da2d10ca64e7fce7363b780. The mixin
statement is also no longer necessary.
Please update to version 0.9.0 to get the fix.
I found a weird quirk.
This code:
Gives:
However, this works:
Although, trying to access an object property causes the same issue again
According to the readme,
mixin
should makex
accessible in generics.Compiler version:
Nim Compiler Version 1.4.6 [Windows: amd64]
Questionable version:
questionable@0.8.0