mirror of
https://github.com/ziglang/zig.git
synced 2024-11-28 08:02:32 +00:00
55ba335e0f
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. |
||
---|---|---|
.. | ||
behavior | ||
src | ||
stage1/c_abi | ||
stage2 | ||
standalone | ||
assemble_and_link.zig | ||
behavior.zig | ||
cases.zig | ||
cli.zig | ||
compare_output.zig | ||
compile_errors.zig | ||
gen_h.zig | ||
run_translated_c.zig | ||
runtime_safety.zig | ||
stack_traces.zig | ||
standalone.zig | ||
tests.zig | ||
translate_c.zig |