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

vfmt: fix type TwoSameArgs = fn (i int, j int) string formatting

This commit is contained in:
Delyan Angelov 2020-10-18 08:54:29 +03:00
parent 5c4ba3474b
commit dd96ba0d24
2 changed files with 2 additions and 2 deletions

View File

@ -522,7 +522,7 @@ pub fn (mut f Fmt) type_decl(node ast.TypeDecl) {
}
}
is_last_arg := i == fn_info.params.len - 1
should_add_type := is_last_arg || fn_info.params[i + 1].typ != arg.typ ||
should_add_type := true || is_last_arg || fn_info.params[i + 1].typ != arg.typ ||
(fn_info.is_variadic && i == fn_info.params.len - 2)
if should_add_type {
if fn_info.is_variadic && is_last_arg {

View File

@ -19,7 +19,7 @@ type OneArgFn = fn (i int)
type TwoDiffArgs = fn (i int, s string) bool
type TwoSameArgs = fn (i, j int) string
type TwoSameArgs = fn (i int, j int) string
type VarArgs = fn (s ...string) int