adds comments

This commit is contained in:
ringabout
2026-04-07 20:40:52 +08:00
parent 99b637b911
commit cb3cab4951

View File

@@ -1894,6 +1894,8 @@ proc genObjConstr(p: BProc, e: PNode, d: var TLoc) =
isRef or
(d.k notin {locTemp,locLocalVar,locGlobalVar,locParam,locField,locExpr}) or
(d.k == locExpr and d.lode.typ != nil and not sameType(d.lode.typ.skipTypes(abstractInst), t)) or
# when d.k == locExpr and the destination type differs from the constructor type (inheritance/subtyping),
# a temporary is still used so that genAssignment can perform the proper type-tag and slicing checks.
(isPartOf(d.lode, e) != arNo)
var tmp: TLoc = default(TLoc)