mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
fmt: fix fmt of Ok<[]Token>{[]} (#14522)
This commit is contained in:
parent
dd8c96f6bc
commit
59e57f0c62
@ -249,7 +249,7 @@ pub fn (mut f Fmt) short_module(name string) string {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if aname == '' {
|
if aname == '' {
|
||||||
return symname
|
return '$tprefix$symname'
|
||||||
}
|
}
|
||||||
return '$tprefix${aname}.$symname'
|
return '$tprefix${aname}.$symname'
|
||||||
}
|
}
|
||||||
|
9
vlib/v/fmt/tests/generic_struct_init_keep.vv
Normal file
9
vlib/v/fmt/tests/generic_struct_init_keep.vv
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
module x
|
||||||
|
|
||||||
|
struct Ok<T> {
|
||||||
|
foo []T
|
||||||
|
}
|
||||||
|
|
||||||
|
fn test_fmt() {
|
||||||
|
r := Ok<[]Token>{[]}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user