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

vfmt: fix eating JS. from JS.Struct{}

This commit is contained in:
Delyan Angelov 2021-06-08 21:19:20 +03:00
parent f0b16fea27
commit 000790b112
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -256,7 +256,7 @@ pub fn (mut f Fmt) struct_init(node ast.StructInit) {
type_sym := f.table.get_type_symbol(node.typ)
// f.write('<old name: $type_sym.name>')
mut name := type_sym.name
if !name.starts_with('C.') {
if !name.starts_with('C.') && !name.starts_with('JS.') {
name = f.no_cur_mod(f.short_module(type_sym.name)) // TODO f.type_to_str?
}
if name == 'void' {