vfmt: fix formatting of struct init without a module prefix

pull/4997/head
Delyan Angelov 2020-05-23 11:56:06 +03:00
parent 70f0115e27
commit c690c2f984
1 changed files with 3 additions and 0 deletions

View File

@ -798,6 +798,9 @@ pub fn (mut f Fmt) short_module(name string) string {
mname := vals[vals.len - 2]
symname := vals[vals.len - 1]
aname := f.mod2alias[mname]
if aname == '' {
return symname
}
return '${aname}.${symname}'
}