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
While would trim the undefined key branch as unreachable.
Why is this useful? you might ask. It allows more ways to disable code paths based on compile time variables. undefined here would generally be a const. Instead you currently get
#1 with zig trunk
zig trunk (Editor #1, Compiler #1) Zig
/home/ubuntu/example.zig:4:5: error: use of undefined value here causes undefined behavior
Compiler returned: 1
Which is bogus (however llvm won't take an undefined here either, IIUC, so it does have to be explicitly handled).
I'm starting to have second thoughts about this proposal, as it muddles the concept of undefined. (not the C concept, but the Zig concept) However I think my use case is sound. Any suggestions?
While would trim the undefined key branch as unreachable.
Why is this useful? you might ask. It allows more ways to disable code paths based on compile time variables.
undefined
here would generally be a const. Instead you currently getWhich is bogus (however llvm won't take an undefined here either, IIUC, so it does have to be explicitly handled).
Related: #597
The text was updated successfully, but these errors were encountered: