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

master
yuyi 2022-05-25 20:17:30 +08:00 committed by GitHub
parent dd8c96f6bc
commit 59e57f0c62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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>{[]}
}