# Sema: fix handling compile errors during circular dependency error · gitcafe/zig

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

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

Visibility: public

Requested revision: dd9782a8bc6f4af458a04cea2619f55e749c39ee

Requested commit: dd9782a8bc6f4af458a04cea2619f55e749c39ee

Commit: dd9782a8bc6f4af458a04cea2619f55e749c39ee

Tree: 6831c36a68b0e52428c15c85ce6815b09636feed

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
Sema: fix handling compile errors during circular dependency error

Previously, Zig would try to generate a function whose type contained
structs or unions which had not been fully resolved due to circular
dependency errors. With this commit, `resolveTypeFully` will be sure to
return `error.AnalysisFail` even in this scenario, leading to proper
display of compilation errors instead of a crash.

```

## Parents

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

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