| author | |
| committer | |
| log | 4e28d7a5f7d6346acc42a7524dd77fa5f9322029 |
| tree | 510e517a76dd45320081692775a9485ad647c599 |
| parent | 8e3370367bbbcae43670380cb4ca841a9e5ada33 |
2 files changed, 4 insertions(+), 1 deletions(-)
src/ir.cpp-1| ... | ... | @@ -8128,7 +8128,6 @@ static ZigType *get_error_set_union(CodeGen *g, ErrorTableEntry **errors, ZigTyp |
| 8128 | 8128 | } |
| 8129 | 8129 | } |
| 8130 | 8130 | assert(index == count); |
| 8131 | assert(count != 0); | |
| 8132 | 8131 | |
| 8133 | 8132 | if (type_name == nullptr) { |
| 8134 | 8133 | buf_appendf(&err_set_type->name, "}"); |
test/stage1/behavior/error.zig+4| ... | ... | @@ -160,6 +160,10 @@ fn testErrToIntWithOnePossibleValue( |
| 160 | 160 | } |
| 161 | 161 | } |
| 162 | 162 | |
| 163 | test "empty error union" { | |
| 164 | const x = error{} || error{}; | |
| 165 | } | |
| 166 | ||
| 163 | 167 | test "error union peer type resolution" { |
| 164 | 168 | testErrorUnionPeerTypeResolution(1); |
| 165 | 169 | } |