mirror of
https://github.com/odin-lang/Odin.git
synced 2025-12-31 18:32:12 +00:00
Fix #2301
This commit is contained in:
@@ -7535,7 +7535,7 @@ gb_internal ExprKind check_ternary_if_expr(CheckerContext *c, Operand *o, Ast *n
|
||||
|
||||
o->mode = Addressing_Value;
|
||||
o->expr = node;
|
||||
if (type_hint != nullptr && is_type_untyped(o->type)) {
|
||||
if (type_hint != nullptr && is_type_untyped(o->type) && !is_type_any(type_hint)) {
|
||||
if (check_cast_internal(c, &x, type_hint) &&
|
||||
check_cast_internal(c, &y, type_hint)) {
|
||||
convert_to_typed(c, o, type_hint);
|
||||
|
||||
Reference in New Issue
Block a user