fmt: fix fmt of Ok<[]Token>{[]} (#14522)

yuyi 2022-05-25 20:17:30 +08:00 committed by Chewing_Bever
parent 3bc50721e2
commit b97a04abd9
Signed by: Jef Roosens
GPG Key ID: B75D4F293C7052DB
2 changed files with 10 additions and 1 deletions

View File

@ -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'
} }

View File

@ -0,0 +1,9 @@
module x
struct Ok<T> {
foo []T
}
fn test_fmt() {
r := Ok<[]Token>{[]}
}