mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 23:58:50 +00:00
Fix #656
This commit is contained in:
@@ -2355,39 +2355,6 @@ void lb_begin_procedure_body(lbProcedure *p) {
|
|||||||
|
|
||||||
if (p->type->Proc.params != nullptr) {
|
if (p->type->Proc.params != nullptr) {
|
||||||
TypeTuple *params = &p->type->Proc.params->Tuple;
|
TypeTuple *params = &p->type->Proc.params->Tuple;
|
||||||
if (p->type_expr != nullptr) {
|
|
||||||
ast_node(pt, ProcType, p->type_expr);
|
|
||||||
isize param_index = 0;
|
|
||||||
isize q_index = 0;
|
|
||||||
|
|
||||||
for_array(i, params->variables) {
|
|
||||||
ast_node(fl, FieldList, pt->params);
|
|
||||||
GB_ASSERT(fl->list.count > 0);
|
|
||||||
GB_ASSERT(fl->list[0]->kind == Ast_Field);
|
|
||||||
if (q_index == fl->list[param_index]->Field.names.count) {
|
|
||||||
q_index = 0;
|
|
||||||
param_index++;
|
|
||||||
}
|
|
||||||
ast_node(field, Field, fl->list[param_index]);
|
|
||||||
Ast *name = field->names[q_index++];
|
|
||||||
|
|
||||||
Entity *e = params->variables[i];
|
|
||||||
if (e->kind != Entity_Variable) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
Type *abi_type = p->type->Proc.abi_compat_params[i];
|
|
||||||
if (e->token.string != "") {
|
|
||||||
lb_add_param(p, e, name, abi_type, parameter_index);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (is_type_tuple(abi_type)) {
|
|
||||||
parameter_index += cast(i32)abi_type->Tuple.variables.count;
|
|
||||||
} else {
|
|
||||||
parameter_index += 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
auto abi_types = p->type->Proc.abi_compat_params;
|
auto abi_types = p->type->Proc.abi_compat_params;
|
||||||
|
|
||||||
for_array(i, params->variables) {
|
for_array(i, params->variables) {
|
||||||
@@ -2409,7 +2376,6 @@ void lb_begin_procedure_body(lbProcedure *p) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (p->type->Proc.has_named_results) {
|
if (p->type->Proc.has_named_results) {
|
||||||
|
|||||||
Reference in New Issue
Block a user