mirror of
https://github.com/odin-lang/Odin.git
synced 2026-10-08 22:01:47 -04:00
Add -internal-global-entity-graph; Fix union type inference bug
This commit is contained in:
1 parent
ac5087776f
commit
b06c5ffa70
5 files changed
+28
No files matched your search
@@ -13112,6 +13112,8 @@ gb_internal ExprKind check_expr_base(CheckerContext *c, Operand *o, Ast *node, T
|
||||
Type *elem_type = core_broadcastable_elem_type(type_hint);
|
||||
if (is_type_untyped(o->type)) {
|
||||
if (is_type_union(elem_type)) {
|
||||
// NOTE: record it first so convert_to_typed's final update keeps a constant that becomes a value (e.g. broadcast to an array variant)
|
||||
add_untyped(c, node, o->mode, o->type, o->value);
|
||||
convert_to_typed(c, o, elem_type);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user