# Sema: fix crash when coercion dest is var args · gitcafe/zig

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

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

Visibility: public

Requested revision: e6b73be870a39f4da7a08a40da23e38b5e9613da

Requested commit: e6b73be870a39f4da7a08a40da23e38b5e9613da

Commit: e6b73be870a39f4da7a08a40da23e38b5e9613da

Tree: b21b81ecc4867273bf864988a8d63bb27b12b6c2

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
Sema: fix crash when coercion dest is var args

When analyzing the `as` ZIR instruction, an assertion would trip if the
result type was a var args function argument. The fix is simple: inline
a little bit of the `resolveType` logic into `analyzeAs` to make it
detect this situation - which it was already attempting to do.

Closes #16197

```

## Parents

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

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