# wasm: Add support for error union as return type · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/967a299c346937316158f58f3d3ae1be7ee0f551)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 967a299c346937316158f58f3d3ae1be7ee0f551

Requested commit: 967a299c346937316158f58f3d3ae1be7ee0f551

Commit: 967a299c346937316158f58f3d3ae1be7ee0f551

Tree: 71fddc09063d6802f57369df074f7e3409c37068

Author: Luuk de Gram

Committer: Luuk de Gram

## Message

```
wasm: Add support for error union as return type

- This currently uses the multi-value feature to return both the possible error, and its payload.
- Also genAlloc and the logic to allocate the locals itself have been seperated, so we can create more locals
whenever needed, and not only when `genAlloc` is called.

```

## Parents

- [54810592326e3cd2cad02318aa07dd1d5da2e731](https://git.cafe/gitcafe/zig/commit/54810592326e3cd2cad02318aa07dd1d5da2e731?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/967a299c346937316158f58f3d3ae1be7ee0f551?format=markdown)
