From b98a4c6d69674bd52773b150d28e5fe235e72519 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Fri, 27 Mar 2020 13:33:31 +0000 Subject: Fix #597 --- src/ir.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/ir.cpp') 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(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); -- cgit v1.2.3