diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-02-05 17:42:13 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-02-05 17:42:13 -0500 |
| commit | 6940212ecbef349e449441e1fd813116865d3a5f (patch) | |
| tree | 02242395c35b7f209b1184bc1941acf2736520a9 /src/codegen.cpp | |
| parent | b7bc259093ccad98cdc5661c493c0bdb4771e899 (diff) | |
| download | zig-6940212ecbef349e449441e1fd813116865d3a5f.tar.gz zig-6940212ecbef349e449441e1fd813116865d3a5f.zip | |
error sets: fix peer resolution of error unions
Diffstat (limited to 'src/codegen.cpp')
| -rw-r--r-- | src/codegen.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp index c533e66d61..e3f182e17c 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -1790,7 +1790,8 @@ static LLVMValueRef ir_render_bin_op(CodeGen *g, IrExecutable *executable, assert(op1->value.type == op2->value.type || op_id == IrBinOpBitShiftLeftLossy || op_id == IrBinOpBitShiftLeftExact || op_id == IrBinOpBitShiftRightLossy || - op_id == IrBinOpBitShiftRightExact); + op_id == IrBinOpBitShiftRightExact || + (op1->value.type->id == TypeTableEntryIdErrorSet && op2->value.type->id == TypeTableEntryIdErrorSet)); TypeTableEntry *type_entry = op1->value.type; bool want_runtime_safety = bin_op_instruction->safety_check_on && |
