From e20184ae5958fb411deb1f236c07327326012b10 Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Wed, 21 Nov 2012 20:57:00 +0100 Subject: [PATCH] ast_ternary needs to adopt the output type --- ast.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ast.c b/ast.c index f6a5d87..7d7443f 100644 --- a/ast.c +++ b/ast.c @@ -652,6 +652,11 @@ ast_ternary* ast_ternary_new(lex_ctx ctx, ast_expression *cond, ast_expression * self->on_true = ontrue; self->on_false = onfalse; + if (!ast_type_adopt(self, ontrue)) { + ast_ternary_delete(self); + return NULL; + } + return self; } -- 2.39.2