Delay determination of procedure abi types until as late as possible to prevent type undetermination in self-referential data types #454

This commit is contained in:
gingerBill
2019-10-31 18:25:39 +00:00
parent 4aad45e3e7
commit ee8d3e03f8
5 changed files with 29 additions and 12 deletions

View File

@@ -89,7 +89,7 @@ Type * check_init_variable (CheckerContext *c, Entity *e, Operand *
Type *type_to_abi_compat_param_type(gbAllocator a, Type *original_type, ProcCallingConvention cc);
Type *type_to_abi_compat_result_type(gbAllocator a, Type *original_type, ProcCallingConvention cc);
bool abi_compat_return_by_pointer(gbAllocator a, ProcCallingConvention cc, Type *abi_return_type);
void set_procedure_abi_types(CheckerContext *c, Type *type);
void set_procedure_abi_types(gbAllocator a, Type *type);
void check_assignment_error_suggestion(CheckerContext *c, Operand *o, Type *type);
Entity *entity_from_expr(Ast *expr) {
@@ -963,7 +963,7 @@ bool is_polymorphic_type_assignable(CheckerContext *c, Type *poly, Type *source,
}
if (modify_type) {
set_procedure_abi_types(c, source);
set_procedure_abi_types(c->allocator, source);
}
return true;