aboutsummaryrefslogtreecommitdiff
path: root/src/check_expr.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2023-09-06 16:55:50 +0100
committergingerBill <bill@gingerbill.org>2023-09-06 16:55:50 +0100
commitc660b43105f34d54192527f2d052346213702dfa (patch)
tree7a5a1ed78ccf00d091b2c2ad241a728b63f32356 /src/check_expr.cpp
parent04129c5bd5f91915bba2e773738a2259124f63cb (diff)
parentd60c619c44373030440cc924b626a138b15d4827 (diff)
Merge branch 'master' of https://github.com/odin-lang/Odin
Diffstat (limited to 'src/check_expr.cpp')
-rw-r--r--src/check_expr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp
index 399c25a9d..a0d3c24bf 100644
--- a/src/check_expr.cpp
+++ b/src/check_expr.cpp
@@ -7927,7 +7927,7 @@ gb_internal ExprKind check_ternary_if_expr(CheckerContext *c, Operand *o, Ast *n
// NOTE(bill, 2023-01-30): Allow for expression like this:
// x: union{f32} = f32(123) if cond else nil
- if (type_hint && !is_type_any(type_hint) && !ternary_compare_types(x.type, y.type)) {
+ if (type_hint && !is_type_any(type_hint)) {
if (check_is_assignable_to(c, &x, type_hint) && check_is_assignable_to(c, &y, type_hint)) {
check_cast(c, &x, type_hint);
check_cast(c, &y, type_hint);