diff options
| author | gingerBill <bill@gingerbill.org> | 2023-08-21 12:19:38 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2023-08-21 12:19:38 +0100 |
| commit | cd42d26eb32d69fcd80c50deba6005a6c44436ed (patch) | |
| tree | 0420196b2c585d6125f7eaba05666d0e6d5e74b6 /src | |
| parent | 8bc96652cdaa15b0b03ee45c93ed3d41eefb7e31 (diff) | |
Fix variadic parapoly bug
Diffstat (limited to 'src')
| -rw-r--r-- | src/check_expr.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 3bd8bca07..399c25a9d 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -5555,11 +5555,7 @@ gb_internal CallArgumentError check_call_arguments_internal(CheckerContext *c, A o.expr->Ident.token.pos = ast_token(variadic_operands[0].expr).pos; Entity *vt = pt->params->Tuple.variables[pt->variadic_index]; - if (is_type_polymorphic(vt->type)) { - o.type = alloc_type_slice(default_type(variadic_operands[0].type)); - } else { - o.type = vt->type; - } + o.type = vt->type; } else { dummy_argument_count += 1; o.type = t_untyped_nil; @@ -5709,6 +5705,10 @@ gb_internal CallArgumentError check_call_arguments_internal(CheckerContext *c, A } continue; } + + if (param_is_variadic) { + continue; + } score += eval_param_and_score(c, o, e->type, err, param_is_variadic, e, show_error); } } |