diff options
author | Araq <rumpf_a@web.de> | 2015-02-07 02:15:50 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-02-07 10:48:08 +0100 |
commit | d933fde40d1232004c9eaa260dc6bd3dc376c272 (patch) | |
tree | b53898e3b60e2000c37cfd49a877532e48c40b0e /compiler | |
parent | 74c6c8c903a2eb497ee74aaf9ba741b1abf40c88 (diff) | |
download | Nim-d933fde40d1232004c9eaa260dc6bd3dc376c272.tar.gz |
yet another C++ bugfix
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/semexprs.nim | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index 26ca54239..eeada0006 100644 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -578,11 +578,12 @@ proc skipObjConv(n: PNode): PNode = proc isAssignable(c: PContext, n: PNode): TAssignableResult = result = parampatterns.isAssignable(c.p.owner, n) -proc newHiddenAddrTaken(c: PContext, n: PNode): PNode = - if n.kind == nkHiddenDeref: +proc newHiddenAddrTaken(c: PContext, n: PNode): PNode = + if n.kind == nkHiddenDeref and not (gCmd == cmdCompileToCpp or + sfCompileToCpp in c.module.flags): checkSonsLen(n, 1) result = n.sons[0] - else: + else: result = newNodeIT(nkHiddenAddr, n.info, makeVarType(c, n.typ)) addSon(result, n) if isAssignable(c, n) notin {arLValue, arLocalLValue}: |