authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-01-05 04:01:11-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-01-05 04:01:11-05:00
log438feebbcf687db47ff4a4be71a67b8587b2d987
tree647d9bc44f065edab158d4b1dcf8b8f724b0d5de
parent3b5e26b7f7e4b37cf9357d058f32c0ad08ed7338

pass undeclared identifier test


1 files changed, 3 insertions(+), 5 deletions(-)

src/ir.cpp+3-5
......@@ -3096,12 +3096,10 @@ static IrInstruction *ir_gen_block(IrBuilder *irb, Scope *parent_scope, AstNode
30963096
30973097static IrInstruction *ir_gen_bin_op_id(IrBuilder *irb, Scope *scope, AstNode *node, IrBinOp op_id) {
30983098 IrInstruction *op1 = ir_gen_node(irb, node->data.bin_op_expr.op1, scope);
3099 if (op1 == irb->codegen->invalid_instruction)
3100 return op1;
3101
31023099 IrInstruction *op2 = ir_gen_node(irb, node->data.bin_op_expr.op2, scope);
3103 if (op2 == irb->codegen->invalid_instruction)
3104 return op2;
3100
3101 if (op1 == irb->codegen->invalid_instruction || op2 == irb->codegen->invalid_instruction)
3102 return irb->codegen->invalid_instruction;
31053103
31063104 return ir_build_bin_op(irb, scope, node, op_id, op1, op2, true);
31073105}