diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-02-28 23:15:58 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-02-28 23:15:58 -0700 |
| commit | 4763fd1a41bc5f6bb59b5c3c079069b84f19305a (patch) | |
| tree | a4f38b1e2150b5d2a88c66d2d96c23b9dd39775c /test/behavior/error.zig | |
| parent | 5e2e7675d53c4258a21d014a09f2a6fdae64b433 (diff) | |
| download | zig-4763fd1a41bc5f6bb59b5c3c079069b84f19305a.tar.gz zig-4763fd1a41bc5f6bb59b5c3c079069b84f19305a.zip | |
Sema: clean up peer resolution of errors
* Fix compile error for `zirErrorUnionType`.
* Convert zirMergeErrorSets logic to call `Type.errorSetMerge`.
It does not need to create a Decl as the TODO comment hinted.
* Extract out a function called `resolveInferredErrorSetTy`.
* Rework `resolvePeerTypes` with respect to error unions and
error sets. This is a less complex implementation that passes all the
same tests and uses many fewer lines of code by taking advantage of
the function `coerceInMemoryAllowedErrorSets`.
- Always merge error sets in the order that makes sense, even when
that means `@typeInfo` incompatibility with stage1.
* `Type.errorSetMerge` no longer overallocates.
* Don't skip passing tests.
Diffstat (limited to 'test/behavior/error.zig')
| -rw-r--r-- | test/behavior/error.zig | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/test/behavior/error.zig b/test/behavior/error.zig index 582a11ebc4..12cc3983a9 100644 --- a/test/behavior/error.zig +++ b/test/behavior/error.zig @@ -264,11 +264,8 @@ fn testErrToIntWithOnePossibleValue( } test "error union peer type resolution" { - if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; - if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO - if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO - if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO + if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO try testErrorUnionPeerTypeResolution(1); } |
