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
Removing the comptime from the comptime var assignment fixes things, allowing the build/run to succeed.
Expected Behavior
Build should succeed, or tell me why what I am doing is a bad idea and/or not allowed. In the real world situation where this came up, I think for some reason the compiler used to be telling me that the union needed to be comptime, even though I probably just needed to add a type to it or something else. 😉
The text was updated successfully, but these errors were encountered:
vancluever
added
the
bug
Observed behavior contradicts documented or intended behavior
label
Apr 2, 2024
@mlugg if it helps, I did roll back to 0.12.0-dev.3405+31791ae15 during troubleshooting, which helped surface some of the errors (I think that re-assignment here actually caused a full-on segfault). 0.12.0-dev.2811+3cafb9655 was working completely without errors.
Zig Version
0.12.0-dev.3518+d2be725e4
Steps to Reproduce and Observed Behavior
The following code will cause SIGTRAP on
zig build
. The repro was set up off of thezig init
scaffolding:Removing the
comptime
from thecomptime var
assignment fixes things, allowing the build/run to succeed.Expected Behavior
Build should succeed, or tell me why what I am doing is a bad idea and/or not allowed. In the real world situation where this came up, I think for some reason the compiler used to be telling me that the union needed to be comptime, even though I probably just needed to add a type to it or something else. 😉
The text was updated successfully, but these errors were encountered: