Open amp-59 opened 2 months ago
Hmm... the issue here is in checking whether to add the return value to the error return trace. But, this makes me think -- should returning undefined
from a function returning an error set or union be considered Illegal Behavior? After all, at runtime, deciding whether a function is put in the error return trace requires a branch on the error tag, so if that tag is undef, that check exhibits Unchecked Illegal Behavior (hence UB). cc @andrewrk
Zig Version
0.14.0-dev.1411+a670f5519
Steps to Reproduce and Observed Behaviour
Compile example program with
zig build-obj error_name_error.zig
error_name_error.zig
:Output: