mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Fix #1448
This commit is contained in:
+11
-3
@@ -5755,8 +5755,12 @@ CallArgumentData check_call_arguments(CheckerContext *c, Operand *operand, Type
|
|||||||
ctx.curr_proc_sig = e->type;
|
ctx.curr_proc_sig = e->type;
|
||||||
|
|
||||||
GB_ASSERT(decl->proc_lit->kind == Ast_ProcLit);
|
GB_ASSERT(decl->proc_lit->kind == Ast_ProcLit);
|
||||||
evaluate_where_clauses(&ctx, call, decl->scope, &decl->proc_lit->ProcLit.where_clauses, true);
|
bool ok = evaluate_where_clauses(&ctx, call, decl->scope, &decl->proc_lit->ProcLit.where_clauses, true);
|
||||||
decl->where_clauses_evaluated = true;
|
decl->where_clauses_evaluated = true;
|
||||||
|
|
||||||
|
if (ok && (data.gen_entity->flags & EntityFlag_ProcBodyChecked) == 0) {
|
||||||
|
check_procedure_later(c, e->file, e->token, decl, e->type, decl->proc_lit->ProcLit.body, decl->proc_lit->ProcLit.tags);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
@@ -5769,6 +5773,7 @@ CallArgumentData check_call_arguments(CheckerContext *c, Operand *operand, Type
|
|||||||
|
|
||||||
Entity *e = entity_of_node(ident);
|
Entity *e = entity_of_node(ident);
|
||||||
|
|
||||||
|
|
||||||
CallArgumentData data = {};
|
CallArgumentData data = {};
|
||||||
CallArgumentError err = call_checker(c, call, proc_type, e, operands, CallArgumentMode_ShowErrors, &data);
|
CallArgumentError err = call_checker(c, call, proc_type, e, operands, CallArgumentMode_ShowErrors, &data);
|
||||||
gb_unused(err);
|
gb_unused(err);
|
||||||
@@ -5777,7 +5782,6 @@ CallArgumentData check_call_arguments(CheckerContext *c, Operand *operand, Type
|
|||||||
if (entity_to_use != nullptr) {
|
if (entity_to_use != nullptr) {
|
||||||
update_untyped_expr_type(c, operand->expr, entity_to_use->type, true);
|
update_untyped_expr_type(c, operand->expr, entity_to_use->type, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data.gen_entity != nullptr) {
|
if (data.gen_entity != nullptr) {
|
||||||
Entity *e = data.gen_entity;
|
Entity *e = data.gen_entity;
|
||||||
DeclInfo *decl = data.gen_entity->decl_info;
|
DeclInfo *decl = data.gen_entity->decl_info;
|
||||||
@@ -5789,8 +5793,12 @@ CallArgumentData check_call_arguments(CheckerContext *c, Operand *operand, Type
|
|||||||
ctx.curr_proc_sig = e->type;
|
ctx.curr_proc_sig = e->type;
|
||||||
|
|
||||||
GB_ASSERT(decl->proc_lit->kind == Ast_ProcLit);
|
GB_ASSERT(decl->proc_lit->kind == Ast_ProcLit);
|
||||||
evaluate_where_clauses(&ctx, call, decl->scope, &decl->proc_lit->ProcLit.where_clauses, true);
|
bool ok = evaluate_where_clauses(&ctx, call, decl->scope, &decl->proc_lit->ProcLit.where_clauses, true);
|
||||||
decl->where_clauses_evaluated = true;
|
decl->where_clauses_evaluated = true;
|
||||||
|
|
||||||
|
if (ok && (data.gen_entity->flags & EntityFlag_ProcBodyChecked) == 0) {
|
||||||
|
check_procedure_later(c, e->file, e->token, decl, e->type, decl->proc_lit->ProcLit.body, decl->proc_lit->ProcLit.tags);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user