Revert "make explicit copy and hook calls keep their symbol (#25731)"

This reverts commit a35614e539.
This commit is contained in:
Andreas Rumpf
2026-04-13 07:06:27 +02:00
committed by GitHub
parent cf3c28c223
commit 14c5d00bab
3 changed files with 4 additions and 57 deletions

View File

@@ -778,17 +778,9 @@ proc replaceHookMagic*(c: PContext, n: PNode, kind: TTypeAttachedOp): PNode =
result[0] = newSymNode(op)
analyseIfAddressTakenInCall(c, result, false)
of attachedSink:
result = n
let t = n[1].typ.skipTypes({tyAlias, tyVar, tySink})
let op = getAttachedOp(c.graph, t, kind)
if op != nil:
result[0] = newSymNode(op)
result = c.semAsgnOpr(c, n, nkSinkAsgn)
of attachedAsgn:
result = n
let t = n[1].typ.skipTypes({tyAlias, tyVar, tySink})
let op = getAttachedOp(c.graph, t, kind)
if op != nil:
result[0] = newSymNode(op)
result = c.semAsgnOpr(c, n, nkAsgn)
of attachedDeepCopy:
result = n
let t = n[1].typ.skipTypes({tyAlias, tyVar, tySink})