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:
parent
5c4ba3474b
commit
dd96ba0d24
@ -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 {
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user