zig/test/behavior
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
..
2022-02-28 23:20:05 +01:00
2022-02-28 23:20:05 +01:00
2021-10-28 17:33:05 -07:00
2022-02-27 18:59:44 -05:00
2022-01-10 21:01:00 +01:00
2022-02-13 14:42:20 +02:00
2022-03-08 21:10:04 +01:00
2022-03-09 13:53:20 -07:00
2022-03-05 11:31:51 +01:00
2022-03-09 16:02:42 -07:00
2022-03-05 11:31:51 +01:00
2022-01-07 00:06:06 -05:00
2022-02-19 14:24:03 +01:00
2022-02-22 21:57:42 +01:00
2022-03-06 16:18:51 -07:00
2022-03-09 13:53:20 -07:00
2021-07-26 20:05:48 -04:00
2022-03-09 13:53:10 -07:00
2022-03-05 11:31:51 +01:00
2022-03-08 20:38:12 +02:00
2022-02-28 23:20:05 +01:00
2022-03-09 13:53:20 -07:00
2022-01-28 11:45:04 -07:00