zig
zig copied to clipboard
astgen: fix result info for catch switch_block_err_union
Fixes #19881.
Todo
- [x] add behaviour tests to catch any future regressions
Looks like the new tests as hitting a TODO in the wasm backend for lowering error union payload pointers. I'd probably need some guidance on how to implement that unless it's acceptable the skip the tests on wasm.
unless it's acceptable the skip the tests on wasm.
It is.
Okay - I've disabled the address-of tests with the wasm backend.
test: disable failing err union switch tests on wasm
This commit message doesn't reflect what is happening in that commit. You're making a lot of changes to behavior tests, what's going on there?
Each of the commented out function calls in test "switch on error union if else capture" would fail on wasm (I didn't check, but I'm pretty sure it will be the same reason as for the address-of tests). The commit is just cut-pasting them into the test "ptr tests" (which probably needs a better name) so they can be disabled on wasm, and unfortunately the diff algorithm doesn't seem to handle it well.
Would you prefer I simply disable the whole original "switch on error union if else capture" test?
Yeah, don't restructure the tests to favor slightly better testing of a backend which is unused in practice. Just disable the whole test for the WASM backend, and it can be re-enabled when the backend is improved.
Okay - I've just disabled all the tests rather than splitting apart those that did or didn't pass on wasm.