diff options
| author | gingerBill <bill@gingerbill.org> | 2020-03-27 13:33:31 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-03-27 13:33:31 +0000 |
| commit | b98a4c6d69674bd52773b150d28e5fe235e72519 (patch) | |
| tree | 3f853c2e75ad05aacbbdc7fc2697ef70b71c1b51 /src/ir.cpp | |
| parent | 4be385d648d76d75de106de7b227f6b88dc7e5da (diff) | |
Fix #597
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index 9fb7b54da..40b83c048 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -6039,11 +6039,12 @@ irValue *ir_emit_logical_binary_expr(irProcedure *proc, TokenKind op, Ast *left, auto edges = array_make<irValue *>(ir_allocator(), 0, done->preds.count+1); for_array(i, done->preds) { - array_add(&edges, short_circuit); + irValue *edge = ir_emit_conv(proc, short_circuit, type); + array_add(&edges, edge); } ir_start_block(proc, rhs); - irValue *edge = ir_build_expr(proc, right); + irValue *edge = ir_emit_conv(proc, ir_build_expr(proc, right), type); array_add(&edges, edge); ir_emit_jump(proc, done); ir_start_block(proc, done); |