Skip to content

Commit

Permalink
another try
Browse files Browse the repository at this point in the history
  • Loading branch information
ringabout committed Oct 22, 2024
1 parent e46d62c commit 91941bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion compiler/transf.nim
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,8 @@ proc transformAddrDeref(c: PTransf, n: PNode, kinds: TNodeKinds, isAddr = false)
) and not (n[0][0].kind == nkSym and n[0][0].sym.kind == skParam and
n.typ.kind == tyVar and
n.typ.skipTypes(abstractVar).kind == tyOpenArray and
n[0][0].typ.skipTypes(abstractVar).kind == tyString)
n[0][0].typ.skipTypes(abstractVar).kind == tyString) and
not (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
Expand Down

0 comments on commit 91941bb

Please sign in to comment.