-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixes #12747 [backport] #13651
fixes #12747 [backport] #13651
Conversation
compiler/transf.nim
Outdated
@@ -563,7 +563,7 @@ proc putArgInto(arg: PNode, formal: PType): TPutArgInto = | |||
return paDirectMapping # XXX really correct? | |||
# what if ``arg`` has side-effects? | |||
case arg.kind | |||
of nkEmpty..nkNilLit: | |||
of nkEmpty..nkNilLit, nkDotExpr: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if it's sideEffectHere().field
? Then we cannot use a direct mapping, can we?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, fixed
I have also added nkObjConstr handling as well and also noticed that nkExprColonExpr is not handled for nkPar, nkTupleConstr. |
Please rebase |
Ready for review |
* fixes #12747 * fix tests * improve code style Co-authored-by: cooldome <[email protected]> (cherry picked from commit 613ea6e)
No description provided.