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

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

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

Visibility: public

Requested revision: b6762c2473fc02e0fa71212a5556f4aed3f1942c

Requested commit: b6762c2473fc02e0fa71212a5556f4aed3f1942c

Commit: b6762c2473fc02e0fa71212a5556f4aed3f1942c

Tree: 522002ada28df5adae70f16600e3dcff598b7732

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

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

When analyzing the `validate_ref_ty` ZIR instruction, an assertion would
trip if the result type was a var args function argument. The fix is the
same as e6b73be870a39f4da7a08a40da23e38b5e9613da - inline the logic of
`resolveType` and handle the case of var args.

Closes #17494

```

## Parents

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

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