* fixes the regressions caused by the fix for #20107 [backport]
This commit is contained in:
parent
d4c0d35b32
commit
5211a471c8
4 changed files with 4 additions and 1 deletions
|
|
@ -735,6 +735,7 @@ proc derefBlock(p: BProc, e: PNode, d: var TLoc) =
|
||||||
# We transform (block: x)[] to (block: x[])
|
# We transform (block: x)[] to (block: x[])
|
||||||
let e0 = e[0]
|
let e0 = e[0]
|
||||||
var n = shallowCopy(e0)
|
var n = shallowCopy(e0)
|
||||||
|
n.typ = e.typ
|
||||||
for i in 0 ..< e0.len - 1:
|
for i in 0 ..< e0.len - 1:
|
||||||
n[i] = e0[i]
|
n[i] = e0[i]
|
||||||
n[e0.len-1] = newTreeIT(nkHiddenDeref, e.info, e.typ, e0[e0.len-1])
|
n[e0.len-1] = newTreeIT(nkHiddenDeref, e.info, e.typ, e0[e0.len-1])
|
||||||
|
|
|
||||||
|
|
@ -569,7 +569,7 @@ proc processScope(c: var Con; s: var Scope; ret: PNode): PNode =
|
||||||
|
|
||||||
template processScopeExpr(c: var Con; s: var Scope; ret: PNode, processCall: untyped): PNode =
|
template processScopeExpr(c: var Con; s: var Scope; ret: PNode, processCall: untyped): PNode =
|
||||||
assert not ret.typ.isEmptyType
|
assert not ret.typ.isEmptyType
|
||||||
var result = newNodeI(nkStmtListExpr, ret.info)
|
var result = newNodeIT(nkStmtListExpr, ret.info, ret.typ)
|
||||||
# There is a possibility to do this check: s.wasMoved.len > 0 or s.final.len > 0
|
# There is a possibility to do this check: s.wasMoved.len > 0 or s.final.len > 0
|
||||||
# later and use it to eliminate the temporary when theres no need for it, but its
|
# later and use it to eliminate the temporary when theres no need for it, but its
|
||||||
# tricky because you would have to intercept moveOrCopy at a certain point
|
# tricky because you would have to intercept moveOrCopy at a certain point
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
discard """
|
discard """
|
||||||
cmd: "nim c -d:release -d:danger $file"
|
cmd: "nim c -d:release -d:danger $file"
|
||||||
|
matrix: ";--gc:orc"
|
||||||
output: "42"
|
output: "42"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ discard """
|
||||||
targets: "c cpp"
|
targets: "c cpp"
|
||||||
disabled: "win"
|
disabled: "win"
|
||||||
disabled: "osx"
|
disabled: "osx"
|
||||||
|
disabled: "linux"
|
||||||
exitcode: 1
|
exitcode: 1
|
||||||
outputsub: "No space left on device"
|
outputsub: "No space left on device"
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue