Skip to content

Commit 59e57f0

Browse files
authored
fmt: fix fmt of Ok<[]Token>{[]} (#14522)
1 parent dd8c96f commit 59e57f0

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

vlib/v/fmt/fmt.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ pub fn (mut f Fmt) short_module(name string) string {
249249
}
250250
}
251251
if aname == '' {
252-
return symname
252+
return '$tprefix$symname'
253253
}
254254
return '$tprefix${aname}.$symname'
255255
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module x
2+
3+
struct Ok<T> {
4+
foo []T
5+
}
6+
7+
fn test_fmt() {
8+
r := Ok<[]Token>{[]}
9+
}

0 commit comments

Comments
 (0)