From b893e0dbf5b13c157f827e71147fc8ba052e4746 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Mon, 29 Feb 2016 14:55:12 +0100 Subject: [PATCH] no name mangling for PHP fields --- compiler/jsgen.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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