Closed thetarnav closed 2 months ago
This is not a bug.
A union with no fields is just zero and thus easily expressed as a constant. Anything else requires platform specific knowledge of its memory layout which prevents it being a compile-time known constant.
It seems that odin doesn't consider expression
Union{num = 1}
whereUnion
is a raw union to be compile-time known constant.odin check
reports an error:report: