aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-07-11 14:40:27 +0100
committerGinger Bill <bill@gingerbill.org>2017-07-11 14:40:27 +0100
commitc4c6975f1b36eb4848aacf81c7be3584c51f9ab6 (patch)
treea73b5401f45e8ffb47ebc3fe64281d7080ab7195 /src/ir.cpp
parent0be0fb2a57e997d4e7efd7b42f7fe1a1b35c80e5 (diff)
`cast(Type)expr`; Fix overloaded procedure determination on assignment
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index 980788f3e..b11255cf1 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -4625,6 +4625,11 @@ irValue *ir_build_expr(irProcedure *proc, AstNode *expr) {
}
case_end;
+ case_ast_node(tc, TypeCast, expr);
+ irValue *e = ir_build_expr(proc, tc->expr);
+ return ir_emit_conv(proc, e, tv.type);
+ case_end;
+
case_ast_node(ue, UnaryExpr, expr);
switch (ue->op.kind) {
case Token_And: