Skip to content

Commit

Permalink
test isAddr
Browse files Browse the repository at this point in the history
  • Loading branch information
ringabout committed Oct 22, 2024
1 parent 91941bb commit 934943d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/transf.nim
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,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 (n.typ.kind == tyVar and n[0][0].typ.kind == tyRef)
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
Expand Down

0 comments on commit 934943d

Please sign in to comment.