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
Since officially zig doesn't support switching on strings
Technically your example is switching on a pointer (= an address), not its pointed-to array elements.
While this isn't used often, I do think it is intended to be supported (so I think your example is correct and it not compiling is indeed a bug).
Zig Version
zig 0.13.0
Steps to Reproduce and Observed Behavior
Compiling and running above yields:
$ zig run test.zig
error: Invalid record (Producer: 'zig 0.13.0' Reader: 'LLVM 18.1.8')
Expected Behavior
Since officially zig doesn't support switching on strings, I'd expect a compiler error instead of invalid LLVM bytecode.
The text was updated successfully, but these errors were encountered: