fix(0123): wrong arg counts to fixed-arity fns error at the call site
checkCallArity compares the supplied count against the declared params (min = params without trailing defaults, max = params.len, unbounded past a variadic) at the five plain dispatch sites in lowerCall — bare selected-author + lazy, namespace alias-gate + qualified, struct method, ufcs. Pack / comptime / generic / #compiler / #builtin callees keep their own dispatch. The method/ufcs sites also gain the appendDefaultArgs fill the generic-instance leg already had, so trailing defaults work on dot-calls instead of emitting under-arity calls. lowerStmt's local fn_decl arm now registers a pointer into the AST node in fn_ast_map, not a stack temporary that aliased every later local fn.
This commit is contained in:
@@ -1800,6 +1800,7 @@ pub const Lowering = struct {
|
||||
pub const reflectionTypeArgGuard = lower_call.reflectionTypeArgGuard;
|
||||
pub const reflectionErrorSentinel = lower_call.reflectionErrorSentinel;
|
||||
pub const appendDefaultArgs = lower_call.appendDefaultArgs;
|
||||
pub const checkCallArity = lower_call.checkCallArity;
|
||||
pub const expandCallDefaults = lower_call.expandCallDefaults;
|
||||
pub const userParamTypes = lower_call.userParamTypes;
|
||||
pub const resolveCallParamTypes = lower_call.resolveCallParamTypes;
|
||||
|
||||
Reference in New Issue
Block a user