aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend_expr.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-10-22 14:37:27 +0100
committergingerBill <bill@gingerbill.org>2021-10-22 14:37:27 +0100
commitc9effb9b9f6dd0400e2396fd2aa6a97e06a14638 (patch)
tree94eaa3427d77dda3700e929bfbba0b05b44fcce1 /src/llvm_backend_expr.cpp
parentef73a284e3e438a25a4e329d59057cfa8cddf44c (diff)
Correct ternary if expression type determination
Diffstat (limited to 'src/llvm_backend_expr.cpp')
-rw-r--r--src/llvm_backend_expr.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/llvm_backend_expr.cpp b/src/llvm_backend_expr.cpp
index 6ad0e1191..214da9e10 100644
--- a/src/llvm_backend_expr.cpp
+++ b/src/llvm_backend_expr.cpp
@@ -762,12 +762,6 @@ lbValue lb_build_binary_expr(lbProcedure *p, Ast *expr) {
case Token_Xor:
case Token_AndNot: {
Type *type = default_type(tv.type);
- if (is_type_typed(be->left->tav.type) && is_type_untyped(be->right->tav.type)) {
- be->right->tav.type = be->left->tav.type;
- } else if (is_type_untyped(be->left->tav.type) && is_type_typed(be->right->tav.type)) {
- be->left->tav.type = type_of_expr(be->right);
- }
-
lbValue left = lb_build_expr(p, be->left);
lbValue right = lb_build_expr(p, be->right);
return lb_emit_arith(p, be->op.kind, left, right, type);