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
The following code causes a segfault in the nim compiler itself.
typeFoo* {.importC, nodecl.} =object# doesn't matter if this is importC or importCpp
value*: int64Bar* {.importCpp, nodecl.} =object# no segfault with importC
foo*: Foodiscard@[Bar()]
This appears to be a minimal repo. In particular, Foo needs to have a member, and Bar needs to be put into a seq. I don't know what other uses of Bar would also cause a compiler segfault, but discard Bar() was insufficient.
The compiler shouldn't segfault? Ideally this would generate working code. If there is a problem with the source file (I don't think there is), it should output a clear error.
Example
The following code causes a segfault in the nim compiler itself.
This appears to be a minimal repo. In particular,
Foo
needs to have a member, andBar
needs to be put into aseq
. I don't know what other uses ofBar
would also cause a compiler segfault, butdiscard Bar()
was insufficient.Current Output
Expected Output
The compiler shouldn't segfault? Ideally this would generate working code. If there is a problem with the source file (I don't think there is), it should output a clear error.
Possible Solution
🤷
Additional Information
Repros at least in 1.6.6 and devel as of efcb89f
The text was updated successfully, but these errors were encountered: