This commit is contained in:
Araq
2026-04-19 22:58:48 +02:00
parent b4d4028afa
commit 615f242de2

View File

@@ -1892,7 +1892,8 @@ proc genObjConstr(p: BProc, e: PNode, d: var TLoc) =
# check if we need to construct the object in a temporary
var useTemp =
isRef or
(d.k notin {locTemp,locLocalVar,locGlobalVar,locParam,locField}) or
(d.k notin {locTemp,locLocalVar,locGlobalVar,locParam,locField} and
d.storage != OnHeap) or
(isPartOf(d.lode, e) != arNo)
var tmp: TLoc = default(TLoc)