commit a86ae6299aa0c4df40065d5cca563fdfe83beb10
parent 71303937f5f98728d7b32bd418599b55fba43d70
Author: Bor Grošelj Simić <bor.groseljsimic@telemach.net>
Date: Thu, 24 Mar 2022 01:44:25 +0100
set cast.secondary type in lower_implicit_cast
Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/check.c b/src/check.c
@@ -111,7 +111,7 @@ lower_implicit_cast(const struct type *to, struct expression *expr)
struct expression *cast = xcalloc(1, sizeof(struct expression));
cast->type = EXPR_CAST;
- cast->result = to;
+ cast->result = cast->cast.secondary = to;
cast->terminates = false;
cast->cast.kind = C_CAST;
cast->cast.value = expr;