Minor change to handling of propagation of errors with --- as a value

This commit is contained in:
gingerBill
2023-05-22 12:53:29 +01:00
parent 540f724b1f
commit 8bf32ac697
15 changed files with 69 additions and 82 deletions

View File

@@ -3218,10 +3218,10 @@ gb_internal lbValue lb_build_call_expr_internal(lbProcedure *p, Ast *expr) {
Entity *e = params->variables[i];
if (args[i].type == nullptr) {
continue;
} else if (is_type_untyped_uninit(args[i].type)) {
args[i] = lb_const_undef(m, e->type);
} else if (is_type_untyped_nil(args[i].type)) {
args[i] = lb_const_nil(m, e->type);
} else if (is_type_untyped_undef(args[i].type)) {
args[i] = lb_const_undef(m, e->type);
}
}
@@ -3409,10 +3409,10 @@ gb_internal lbValue lb_build_call_expr_internal(lbProcedure *p, Ast *expr) {
Entity *e = param_tuple->variables[i];
if (args[i].type == nullptr) {
continue;
} else if (is_type_untyped_uninit(args[i].type)) {
args[i] = lb_const_undef(m, e->type);
} else if (is_type_untyped_nil(args[i].type)) {
args[i] = lb_const_nil(m, e->type);
} else if (is_type_untyped_undef(args[i].type)) {
args[i] = lb_const_undef(m, e->type);
}
}
}