aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-04-22 17:29:48 +0100
committergingerBill <bill@gingerbill.org>2021-04-22 17:29:48 +0100
commitac53577e9b8f310bfdd663b6bdac38246165d1ff (patch)
tree3be64e1fe4256e8fd9d71a3a19437ef5f789b683 /src/ir.cpp
parent896057b5a7433b6251f638afdc65b18f1873f2cc (diff)
Improve `auto_cast` logic
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index 9f08450d6..1c81f08ed 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -8257,7 +8257,8 @@ irValue *ir_build_expr_internal(irProcedure *proc, Ast *expr) {
case_end;
case_ast_node(ac, AutoCast, expr);
- return ir_build_expr(proc, ac->expr);
+ irValue *value = ir_build_expr(proc, ac->expr);
+ return ir_emit_conv(proc, value, tv.type);
case_end;
case_ast_node(ue, UnaryExpr, expr);