summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2015-02-07 10:47:11 +0100
committerAraq <rumpf_a@web.de>2015-02-07 10:48:09 +0100
commit1314e91ef53c5ceb532b4113c92b90d84cd5c63b (patch)
treeba6042cc2d371b9f95ce73d49e41dc5ee80f1205 /compiler
parentd933fde40d1232004c9eaa260dc6bd3dc376c272 (diff)
downloadNim-1314e91ef53c5ceb532b4113c92b90d84cd5c63b.tar.gz
fixes c++ codegen regression
Diffstat (limited to 'compiler')
-rw-r--r--compiler/ccgcalls.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/ccgcalls.nim b/compiler/ccgcalls.nim
index 5e8bbc335..b9fc694cb 100644
--- a/compiler/ccgcalls.nim
+++ b/compiler/ccgcalls.nim
@@ -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: