aboutsummaryrefslogtreecommitdiff
path: root/src/check_expr.cpp
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2024-10-04 12:25:54 +0100
committerGitHub <noreply@github.com>2024-10-04 12:25:54 +0100
commit9fe8095a848f1a8d81e4ac4b85cd666909c4eb7b (patch)
treecff0e3110c51371cbf6e97c0fcec525278a37710 /src/check_expr.cpp
parentdd7c88989a0d66235ff8cfb0fc482d8503e8ca97 (diff)
parent3ff887c6b6b838e9d4932b78ef1ac9319f522d8f (diff)
Merge pull request #4338 from laytan/fix-ternary-swallow-error
fix not erroring on invalid ternary
Diffstat (limited to 'src/check_expr.cpp')
-rw-r--r--src/check_expr.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp
index fc1aa62e6..3b61e049c 100644
--- a/src/check_expr.cpp
+++ b/src/check_expr.cpp
@@ -8795,11 +8795,6 @@ gb_internal ExprKind check_ternary_if_expr(CheckerContext *c, Operand *o, Ast *n
return kind;
}
- if (x.type == nullptr || x.type == t_invalid ||
- y.type == nullptr || y.type == t_invalid) {
- return kind;
- }
-
bool use_type_hint = type_hint != nullptr && (is_operand_nil(x) || is_operand_nil(y));
convert_to_typed(c, &x, use_type_hint ? type_hint : y.type);