1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

ci: run vfmt over checker.v

This commit is contained in:
Delyan Angelov 2020-09-27 17:08:11 +03:00
parent 7305b2c401
commit cfdf66c129

View File

@ -1130,7 +1130,8 @@ pub fn (mut c Checker) call_method(mut call_expr ast.CallExpr) table.Type {
call_expr.should_be_skipped = true
}
nr_args := if method.params.len == 0 { 0 } else { method.params.len - 1 }
min_required_args := method.params.len - if method.is_variadic && method.params.len > 1 { 2 } else { 1 }
min_required_args := method.params.len - if method.is_variadic && method.params.len >
1 { 2 } else { 1 }
if call_expr.args.len < min_required_args {
c.error('too few arguments in call to `${left_type_sym.source_name}.$method_name` ($call_expr.args.len instead of $min_required_args)',
call_expr.pos)