mirror of
https://github.com/nim-lang/Nim.git
synced 2026-05-01 03:24:41 +00:00
fixes #25167
(cherry picked from commit fed0053481)
This commit is contained in:
@@ -834,7 +834,9 @@ proc transformFor(c: PTransf, n: PNode): PNode =
|
||||
var temp = newTemp(c, arg[0].typ, formal.info)
|
||||
addVar(v, temp)
|
||||
stmtList.add(newAsgnStmt(c, nkFastAsgn, temp, arg[0], true))
|
||||
newC.mapping[formal.itemId] = newDeref(temp)
|
||||
let newD = newDeref(temp)
|
||||
newD.typ() = t
|
||||
newC.mapping[formal.itemId] = newD
|
||||
else:
|
||||
# generate a temporary and produce an assignment statement:
|
||||
var temp = newTemp(c, t, formal.info)
|
||||
|
||||
Reference in New Issue
Block a user