-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nim tries to resolve generic field type name even though when condition is false #4774
Comments
Hrm, could this be the same as #4797? |
Yeah, looks the same. |
The reason is that in generic contexts, we do not set the correct branch to be evaluated and instead evaluate all the branches Lines 663 to 668 in ab72d68
It can be fixed currently for simple boolean expressions I think. Lines 407 to 409 in ab72d68
|
This is really nasty to fix... |
Was fixed in #24042 |
closes nim-lang#4774, closes nim-lang#7385, closes nim-lang#10019, closes nim-lang#12405, closes nim-lang#12732, closes nim-lang#13270, closes nim-lang#13799, closes nim-lang#15247, closes nim-lang#16128, closes nim-lang#16175, closes nim-lang#16774, closes nim-lang#17527, closes nim-lang#20880, closes nim-lang#21346
Sample:
The error occurs when you try to compile this without
--threads:on
option.That is only specific to generic types.
Nim Git hash: 9784e36
The text was updated successfully, but these errors were encountered: