From daa0d15dd2566ca02be4e6247cbe2fcfc381c095 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Fri, 7 Nov 2025 21:41:10 +0800 Subject: [PATCH] fixes #25265; fixes #23453; Unable to build Nim 2.2.6 tools from source --- compiler/ccgexprs.nim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compiler/ccgexprs.nim b/compiler/ccgexprs.nim index d3e215ea56..d3c4de0f4a 100644 --- a/compiler/ccgexprs.nim +++ b/compiler/ccgexprs.nim @@ -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