aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/llvm.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-03-11 19:31:29 -0700
committerAndrew Kelley <andrew@ziglang.org>2022-03-11 19:38:07 -0700
commit55ba335e0ffc2af76bf0743d98f5a959ccce0409 (patch)
treef9f705b5f33d0d54c52cdee9e38e40424ab9fd52 /src/codegen/llvm.zig
parent2ee3cc453c4cefa3519f6a6238d4721364d829ae (diff)
downloadzig-55ba335e0ffc2af76bf0743d98f5a959ccce0409.tar.gz
zig-55ba335e0ffc2af76bf0743d98f5a959ccce0409.zip
Sema: fix resolution of inferred error sets
Introduce `Module.ensureFuncBodyAnalyzed` and corresponding `Sema` function. This mirrors `ensureDeclAnalyzed` except also waits until the function body has been semantically analyzed, meaning that inferred error sets will have been populated. Resolving error sets can now emit a "unable to resolve inferred error set" error instead of producing an incorrect error set type. Resolving error sets now calls `ensureFuncBodyAnalyzed`. Closes #11046. `coerceInMemoryAllowedErrorSets` now does a lot more work to avoid resolving an inferred error set if possible. Same with `wrapErrorUnionSet`. Inferred error set types no longer check the `func` field to determine if they are equal. That was incorrect because an inline or comptime function call produces a unique error set which has the same `*Module.Fn` value for this field. Instead we use the `*Module.Fn.InferredErrorSet` pointers to test equality of inferred error sets.
Diffstat (limited to 'src/codegen/llvm.zig')
0 files changed, 0 insertions, 0 deletions