-
-
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
Compile error from backend gcc when generic int type is defined #19051
Comments
What the ...? This is the weirdest bug I've ever seen. |
I have tested same code on Nim playground. |
It took a bit of effort to bisect this but it looks like this was introduced in 745f164 |
So the buggy code is emitted in I'm still trying to figure out what exactly the right behaviour is here. If anyone has any ideas that would help. |
Following code causes compile error on backend gcc:
Compile log:
Following code compiles successfully.
It seems defining generic int type and
-a
cause this problem.Without GInt type:
Without generics:
Use bool instead of int for GInt[T]:
Echo a as is:
Multiply
-1
instead of-a
:distinct int
type:Tested on devel Nim:
The text was updated successfully, but these errors were encountered: