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:
parent
70f0115e27
commit
c690c2f984
|
@ -798,6 +798,9 @@ pub fn (mut f Fmt) short_module(name string) string {
|
||||||
mname := vals[vals.len - 2]
|
mname := vals[vals.len - 2]
|
||||||
symname := vals[vals.len - 1]
|
symname := vals[vals.len - 1]
|
||||||
aname := f.mod2alias[mname]
|
aname := f.mod2alias[mname]
|
||||||
|
if aname == '' {
|
||||||
|
return symname
|
||||||
|
}
|
||||||
return '${aname}.${symname}'
|
return '${aname}.${symname}'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user