Handle proper expression type assignment

This commit is contained in:
Dale Weiler 2013-10-04 06:53:09 -04:00
parent cc69370575
commit 2cf5046d38

4
ast.c
View file

@ -467,9 +467,9 @@ ast_binary* ast_binary_new(lex_ctx_t ctx, int op,
else
self->expression.vtype = TYPE_FLOAT;
}
else if (op == INSTR_BITAND || op == INSTR_BITOR)
else if (op == INSTR_BITAND || op == INSTR_BITOR || op == INSTR_MUL_F)
self->expression.vtype = TYPE_FLOAT;
else if (op == INSTR_MUL_FV || op == INSTR_MUL_FV)
else if (op >= INSTR_MUL_V && op <= INSTR_MUL_VF)
self->expression.vtype = TYPE_VECTOR;
else
self->expression.vtype = left->vtype;