authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2016-02-13 15:03:19-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2016-02-13 15:03:19-07:00
log03b51a753a9cdddc362ace7266534ddf1f6d40c7
tree2c34cf916a38ce50306a4efbc4a00792c623563c
parent8d510c699afe2b508482f2c106ef4b4524a5861b

a = b % c uses the types of b and c instead of a


1 files changed, 2 insertions(+), 2 deletions(-)

src/analyze.cpp+2-2
...@@ -2922,8 +2922,8 @@ static TypeTableEntry *analyze_bin_op_expr(CodeGen *g, ImportTableEntry *import,...@@ -2922,8 +2922,8 @@ static TypeTableEntry *analyze_bin_op_expr(CodeGen *g, ImportTableEntry *import,
2922 {2922 {
2923 AstNode **op1 = node->data.bin_op_expr.op1->parent_field;2923 AstNode **op1 = node->data.bin_op_expr.op1->parent_field;
2924 AstNode **op2 = node->data.bin_op_expr.op2->parent_field;2924 AstNode **op2 = node->data.bin_op_expr.op2->parent_field;
2925 TypeTableEntry *lhs_type = analyze_expression(g, import, context, expected_type, *op1);2925 TypeTableEntry *lhs_type = analyze_expression(g, import, context, nullptr, *op1);
2926 TypeTableEntry *rhs_type = analyze_expression(g, import, context, expected_type, *op2);2926 TypeTableEntry *rhs_type = analyze_expression(g, import, context, nullptr, *op2);
29272927
2928 AstNode *op_nodes[] = {*op1, *op2};2928 AstNode *op_nodes[] = {*op1, *op2};
2929 TypeTableEntry *op_types[] = {lhs_type, rhs_type};2929 TypeTableEntry *op_types[] = {lhs_type, rhs_type};