1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

vfmt: fix formatting of struct init without a module prefix

This commit is contained in:
Delyan Angelov 2020-05-23 11:56:06 +03:00
parent 70f0115e27
commit c690c2f984

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