mirror of
https://github.com/odin-lang/Odin.git
synced 2025-12-31 18:32:12 +00:00
Properly fix #3820
This commit is contained in:
@@ -4431,9 +4431,14 @@ gb_internal void convert_to_typed(CheckerContext *c, Operand *operand, Type *tar
|
||||
defer (gb_string_free(type_str));
|
||||
|
||||
if (valid_count == 1) {
|
||||
Type *new_type = t->Union.variants[first_success_index];
|
||||
target_type = new_type;
|
||||
if (is_type_union(new_type)) {
|
||||
convert_to_typed(c, operand, new_type);
|
||||
break;
|
||||
}
|
||||
operand->type = new_type;
|
||||
operand->mode = Addressing_Value;
|
||||
operand->type = t->Union.variants[first_success_index];
|
||||
target_type = t->Union.variants[first_success_index];
|
||||
break;
|
||||
} else if (valid_count > 1) {
|
||||
ERROR_BLOCK();
|
||||
|
||||
Reference in New Issue
Block a user