diff options
| author | Veikka Tuominen <git@vexu.eu> | 2022-03-12 11:14:17 +0200 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2022-03-12 11:14:17 +0200 |
| commit | 98a01f99c9b6834608055417169c2b3531ea67b6 (patch) | |
| tree | ee920753881775df052875b2029ad8eca2e934d5 /test/behavior/error.zig | |
| parent | e5d4a694ea7dd251e10d6434c9321b5e0a548d4b (diff) | |
| download | zig-98a01f99c9b6834608055417169c2b3531ea67b6.tar.gz zig-98a01f99c9b6834608055417169c2b3531ea67b6.zip | |
Sema: fix typo in resolvePeerTypes
Diffstat (limited to 'test/behavior/error.zig')
| -rw-r--r-- | test/behavior/error.zig | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/behavior/error.zig b/test/behavior/error.zig index b3503051fb..93d76443ae 100644 --- a/test/behavior/error.zig +++ b/test/behavior/error.zig @@ -626,3 +626,11 @@ test "inferred error set equality" { try expect(BarError == BarError); try expect(BazError == BazError); } + +test "peer type resolution of two different error unions" { + const a: error{B}!void = {}; + const b: error{A}!void = {}; + var cond = true; + const err = if (cond) a else b; + try err; +} |
