fixes c++ codegen regression

This commit is contained in:
Araq
2015-02-07 10:47:11 +01:00
parent d933fde40d
commit 1314e91ef5

View File

@@ -303,7 +303,7 @@ proc genThisArg(p: BProc; ri: PNode; i: int; typ: PType): PRope =
if x.typ.kind == tyPtr:
result = genArgNoParam(p, x)
result.app("->")
elif x.kind in {nkHiddenDeref, nkDerefExpr}:
elif x.kind in {nkHiddenDeref, nkDerefExpr} and x[0].typ.kind == tyPtr:
result = genArgNoParam(p, x[0])
result.app("->")
else: