fixes #25265; fixes #23453; Unable to build Nim 2.2.6 tools from source

This commit is contained in:
ringabout
2025-11-07 21:41:10 +08:00
parent 839cbeb371
commit daa0d15dd2

View File

@@ -919,6 +919,10 @@ proc genDeref(p: BProc, e: PNode, d: var TLoc) =
return
else:
a = initLocExprSingleUse(p, e[0])
if e.typ.kind == tyObject:
# bug #23453 #25265
discard getTypeDesc(p.module, e.typ)
if d.k == locNone:
# dest = *a; <-- We do not know that 'dest' is on the heap!
# It is completely wrong to set 'd.storage' here, unless it's not yet