php codegen: name mangling bugfix

This commit is contained in:
Andreas Rumpf
2016-02-26 23:50:34 +01:00
parent 983f6d53ca
commit 6d2fd0c9f1

View File

@@ -192,8 +192,9 @@ proc mangleName(s: PSym; target: TTarget): Rope =
x.add("HEX" & toHex(ord(c), 2))
inc i
result = rope(x)
add(result, "_")
add(result, rope(s.id))
if s.name.s != "this":
add(result, "_")
add(result, rope(s.id))
s.loc.r = result
proc escapeJSString(s: string): string =