# Sema: fix a couple use-after-free bugs · gitcafe/zig

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

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

Visibility: public

Requested revision: b24e9b6347afc66aa94f61b3ed4c2d02cdb0d0ee

Requested commit: b24e9b6347afc66aa94f61b3ed4c2d02cdb0d0ee

Commit: b24e9b6347afc66aa94f61b3ed4c2d02cdb0d0ee

Tree: 7a9d2af51b046c8422facc14377b99a210250787

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
Sema: fix a couple use-after-free bugs

Also switch to the more efficient encoding of the bitcast instruction
when the destination type is anyerror in 2 common cases.

LLVM backend: fix using the wrong type as the optional payload type in
the `wrap_optional` AIR instruction.

```

## Parents

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

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