diff --git a/compiler/jsgen.nim b/compiler/jsgen.nim index 8f1f8a8320..fc27a3ec08 100644 --- a/compiler/jsgen.nim +++ b/compiler/jsgen.nim @@ -192,7 +192,7 @@ proc mangleName(s: PSym; target: TTarget): Rope = x.add("HEX" & toHex(ord(c), 2)) inc i result = rope(x) - if s.name.s != "this": + if s.name.s != "this" and s.kind != skField: add(result, "_") add(result, rope(s.id)) s.loc.r = result