zig/test
Andrew Kelley 55ba335e0f 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.
2022-03-11 19:38:07 -07:00
..
behavior Sema: fix resolution of inferred error sets 2022-03-11 19:38:07 -07:00
src std lib API deprecations for the upcoming 0.9.0 release 2021-11-30 00:13:07 -07:00
stage1/c_abi C ABI: these tests are not passing yet on Windows 2022-02-08 21:15:00 -07:00
stage2 stage2: passing threadlocal tests for x86_64-linux 2022-03-11 00:04:42 -07:00
standalone Revert "reduce build error noise" 2022-02-17 14:30:12 -07:00
assemble_and_link.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
behavior.zig Sema: fix resolution of inferred error sets 2022-03-11 19:38:07 -07:00
cases.zig disable failing nvptx test case 2022-02-21 23:48:07 -07:00
cli.zig Full response file (*.rsp) support 2022-01-30 21:27:52 +02:00
compare_output.zig Full response file (*.rsp) support 2022-01-30 21:27:52 +02:00
compile_errors.zig deprecated TypeInfo in favor of Type 2022-03-08 20:38:12 +02:00
gen_h.zig run zig fmt on src/ and test/ 2020-10-31 12:21:49 +02:00
run_translated_c.zig translate-c: use nested scope for comma operator in macros 2022-03-08 20:38:51 +02:00
runtime_safety.zig fix unused variable errors in runtime safety test cases 2021-06-23 10:44:46 -07:00
stack_traces.zig overhaul elf csu (c-runtime startup) logic 2021-05-23 15:38:57 -04:00
standalone.zig Revert "reduce build error noise" 2022-02-17 14:30:12 -07:00
tests.zig Replace argvCmd with std.mem.join 2022-02-06 22:21:46 -07:00
translate_c.zig translate-c: improve error messages when expecting specific tokens 2022-01-17 17:16:48 +02:00