mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-25 07:04:58 -07:00
Fix polymorphic record parameter determination bug caused by polymorphic constants not being handled correctly #447
This commit is contained in:
@@ -6344,8 +6344,6 @@ CallArgumentError check_polymorphic_record_type(CheckerContext *c, Operand *oper
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
|
||||
String generated_name = make_string_c(expr_to_string(call));
|
||||
|
||||
CheckerContext ctx = *c;
|
||||
|
||||
@@ -461,6 +461,10 @@ void check_struct_type(CheckerContext *ctx, Type *struct_type, Ast *node, Array<
|
||||
e = alloc_entity_type_name(scope, token, operand.type);
|
||||
e->TypeName.is_type_alias = true;
|
||||
} else {
|
||||
if (is_type_polymorphic(base_type(operand.type))) {
|
||||
is_polymorphic = true;
|
||||
can_check_fields = false;
|
||||
}
|
||||
e = alloc_entity_constant(scope, token, operand.type, operand.value);
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user