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 compiler crashes since mangling.nim was added. After a while I've traced it to the presence of an object member that has a {.cdecl, varargs.} procedure even if it's never accessed (trying to access a different member causes the crash).
Example
Try to compile this: (I've only tested with the C backend)
type P =ptrobject
a: proc()
b: proc() {.cdecl, varargs.}
var p: P
p.a()
## Summary
Fix the compiler crashing when a non-closure `proc` type with C-style
varargs is used somewhere. Only the C backend was affected.
Fixes#1394.
## Details
* `mirtypes.callConv` didn't consider the `x` field storing a boolean
value in the most-significant bit, resulting in range defect
* the integer value is now properly masked before converting it to a
`TCallingConvention` enum value
Specification
The compiler crashes since
mangling.nim
was added. After a while I've traced it to the presence of an object member that has a{.cdecl, varargs.}
procedure even if it's never accessed (trying to access a different member causes the crash).Example
Try to compile this: (I've only tested with the C backend)
Actual Output
The text was updated successfully, but these errors were encountered: