(cherry picked from commit 476b4ff372)
This commit is contained in:
Araq
2019-07-03 12:07:01 +02:00
committed by narimiran
parent 191b7e0bde
commit 6a6a9423e4

View File

@@ -1650,8 +1650,11 @@ proc makePtrType(baseType: PType): PType =
addSonSkipIntLit(result, baseType)
proc makeAddr(n: PNode): PNode =
result = newTree(nkHiddenAddr, n)
result.typ = makePtrType(n.typ)
if n.kind == nkHiddenAddr:
result = n
else:
result = newTree(nkHiddenAddr, n)
result.typ = makePtrType(n.typ)
proc genSetLengthSeq(p: BProc, e: PNode, d: var TLoc) =
if p.config.selectedGc == gcDestructors: