mirror of
https://github.com/odin-lang/Odin.git
synced 2025-12-30 09:54:45 +00:00
Improve type inference system to allow &{} alongside &T{} in some cases
This commit is contained in:
@@ -7335,7 +7335,12 @@ ExprKind check_expr_base_internal(CheckerContext *c, Operand *o, Ast *node, Type
|
||||
case_ast_node(ue, UnaryExpr, node);
|
||||
Ast *prev_unary_address_hint = c->unary_address_hint;
|
||||
c->unary_address_hint = unparen_expr(node);
|
||||
check_expr_base(c, o, ue->expr, type_hint);
|
||||
|
||||
Type *th = type_hint;
|
||||
if (ue->op.kind == Token_And) {
|
||||
th = type_deref(th);
|
||||
}
|
||||
check_expr_base(c, o, ue->expr, th);
|
||||
c->unary_address_hint = prev_unary_address_hint;
|
||||
node->viral_state_flags |= ue->expr->viral_state_flags;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user