From 3646469d00785c545b5efad8c211fa57475d8dba Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Thu, 9 Oct 2025 21:09:32 +0800 Subject: [PATCH] test deref --- compiler/transf.nim | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/compiler/transf.nim b/compiler/transf.nim index 7ad4634ea3..066be57f87 100644 --- a/compiler/transf.nim +++ b/compiler/transf.nim @@ -519,8 +519,7 @@ proc transformAddrDeref(c: PTransf, n: PNode, kinds: TNodeKinds, isAddr = false) n.typ.kind == tyVar and n.typ.skipTypes(abstractVar).kind == tyOpenArray and n[0][0].typ.skipTypes(abstractVar).kind == tyString) and - not (isAddr and n.typ.kind == tyVar and n[0][0].typ.kind == tyRef and - n[0][0].kind == nkObjConstr) + not (isAddr and n.typ.kind == tyVar and n[0][0].typ.kind == tyRef) : # elimination is harmful to `for tuple unpack` because of newTupleAccess # it is also harmful to openArrayLoc (var openArray) for strings # addr ( deref ( x )) --> x