From 99fe673f0a7877e8b502c8832d606697436318da Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Sat, 18 Aug 2012 20:02:18 +0200 Subject: [PATCH] ast_unary needs to set its type --- ast.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ast.c b/ast.c index c3dfe21..3d8d45f 100644 --- a/ast.c +++ b/ast.c @@ -322,6 +322,11 @@ ast_unary* ast_unary_new(lex_ctx ctx, int op, self->op = op; self->operand = expr; + if (op >= INSTR_NOT_F && op <= INSTR_NOT_FNC) { + self->expression.vtype = TYPE_FLOAT; + } else + asterror(ctx, "cannot determine type of unary operation %s", asm_instr[op].m); + return self; } -- 2.39.2