-
-
Notifications
You must be signed in to change notification settings - Fork 662
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
Fix null coal assign #11963
base: development
Are you sure you want to change the base?
Fix null coal assign #11963
Conversation
We should never double-type anything, so it would be a good idea to add a test that checks that. One way to do that is by having a macro call that would execute twice. It would also be good to add a test that's a bit more straightforward. |
I think this case is quite complicated and we'll have to do something similar to what |
I've started implementing this based on the current tests. We'll have to go through all these This approach is going to lead to some code duplication with |
Of note: testing the correct code generation isn't very trivial because the difference between |
eq("value", value); | ||
|
||
// TODO: this fails at the moment with some "not enough arguments error" | ||
// mutAssignLeft(obj.field) ??= "not value"; |
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.
This fails while typing the lhs already, so the whole ??=
handling isn't even involved here. I think what happens is that it somehow tries to resolve the call while typing the macro result in MSet
mode, or something along those lines.
This types e1 twice, maybe can be done without it?
Closes #11931