diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2024-08-20 19:09:06 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-20 19:09:06 +0800 |
commit | 43274bfb9277999b8dcc205731f574c4b9924ac4 (patch) | |
tree | 84dcb12376d9cef688fca5aeaeaf93a89ab7f859 /compiler/transf.nim | |
parent | 26107e931cb846647bae3a7335d2ac1993dc4386 (diff) | |
download | Nim-43274bfb9277999b8dcc205731f574c4b9924ac4.tar.gz |
fixes #23982; codegen regression passing pointer expressions to inline iterators (#23986)
fixes #23982
Diffstat (limited to 'compiler/transf.nim')
-rw-r--r-- | compiler/transf.nim | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/transf.nim b/compiler/transf.nim index a0a42d98c..7ab4ccae2 100644 --- a/compiler/transf.nim +++ b/compiler/transf.nim @@ -632,9 +632,11 @@ proc putArgInto(arg: PNode, formal: PType): TPutArgInto = case arg.kind of nkEmpty..nkNilLit: result = paDirectMapping - of nkDotExpr, nkDerefExpr, nkHiddenDeref, nkAddr, nkHiddenAddr: + of nkDotExpr, nkDerefExpr, nkHiddenDeref: result = putArgInto(arg[0], formal) - #if result == paViaIndirection: result = paFastAsgn + of nkAddr, nkHiddenAddr: + result = putArgInto(arg[0], formal) + if result == paViaIndirection: result = paFastAsgn of nkCurly, nkBracket: for i in 0..<arg.len: if putArgInto(arg[i], formal) != paDirectMapping: |