From f16b94a9d7011bd00ebb3966d76ef8b2c0dfc752 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Tue, 18 Jul 2023 22:05:05 +0800 Subject: [PATCH] extend the skipAddr for potential types for destructors (#22265) extend the skipAddr for potential types --- compiler/semmagic.nim | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/compiler/semmagic.nim b/compiler/semmagic.nim index e7057053b7..f94d8dc33e 100644 --- a/compiler/semmagic.nim +++ b/compiler/semmagic.nim @@ -610,8 +610,7 @@ proc magicsAfterOverloadResolution(c: PContext, n: PNode, if op != nil: result[0] = newSymNode(op) - if op.typ != nil and op.typ.len == 2 and op.typ[1].kind != tyVar and - skipAddr(n[1]).typ.kind == tyDistinct: + if op.typ != nil and op.typ.len == 2 and op.typ[1].kind != tyVar: if n[1].kind == nkSym and n[1].sym.kind == skParam and n[1].typ.kind == tyVar: result[1] = genDeref(n[1])