# Sema: enhance is_non_err to be comptime more often · gitcafe/zig

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

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

Visibility: public

Requested revision: c21f046a8b019c42aa0dbb0fb9c592b590edf977

Requested commit: c21f046a8b019c42aa0dbb0fb9c592b590edf977

Commit: c21f046a8b019c42aa0dbb0fb9c592b590edf977

Tree: 96c7f602f08b00c9cabdd699f8f678de215e50c5

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
Sema: enhance is_non_err to be comptime more often

 * Sema: store the precomputed monomorphed_funcs hash inside Module.Fn.
   This is important because it may be accessed when resizing monomorphed_funcs
   while this Fn has already been added to the set, but does not have the
   owner_decl, comptime_args, or other fields populated yet.
 * Sema: in `analyzeIsNonErr`, take advantage of the AIR tag being
   `wrap_errunion_payload` to infer that `is_non_err` is comptime true
   without performing any error set resolution.
   - Also add some code to check for empty inferred error sets in this
     function. If necessary we do resolve the inferred error set.
 * Sema: queue full type resolution of payload type when
   `wrap_errunion_payload` AIR instruction is emitted. This ensures the
   backend may check the alignment of it.
 * Sema: resolveTypeFully now additionally resolves comptime-only
   status.

closes #11306

```

## Parents

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

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