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

pull/10394/head^2
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
1 changed files with 1 additions and 1 deletions

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