-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Compound operators don't work in reactive statements #3634
Comments
I haven't checked this, but I believe what needs to be done for there is to make the identifier in |
…dency Compound assignments ('x += y', 'x *= y', etc) should have the left-hand side of the assignment as a dependency.
…dency Compound assignments ('x += y', 'x *= y', etc) should have the left-hand side of the assignment as a dependency.
It was actually the |
Ah, yep, it looks like |
I'm not sure how, but for some reason that already works. I'll see if I can find out how that works tomorrow and add a test to make sure it keeps on working. |
…dency Compound assignments ('x += y', 'x *= y', etc) should have the left-hand side of the assignment as a dependency.
@Conduitry Pull request is over here |
Describe the bug
Compound operators don't work in reactive statements, I suspect this has to do with the fact that there are no variables the assignment depends on. So it is not run when the value of the left hand side of the operator changes.
To Reproduce
REPL
Expected behavior
In the REPL example when clicking the button the first time count should be 2 and after pressing the button a second time the count should be 6.
Severity
Slightly annoying but easily worked around by not using compound operators.
The text was updated successfully, but these errors were encountered: