Skip to content
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 #3634 compound operators in reactive statement #3640

Conversation

blackwolf12333
Copy link
Contributor

Adds 2 sets of tests, one for the compound assignment operators (x += y) that did not actually work yet, and one for the update expressions (x--, y++) which already worked but did not have specific tests.

I haven't figured out yet why the update expressions just work, but the test will at least ensure they won't randomly break anymore.

One thing I wasn't exactly sure about is if the way I'm detecting a compound assignment operator is the best way to do it. This should work because I basically took all the operators in the AssignmentOperator type except actual assignment and put them in a list. But if ever another operator is added this will have to be added in that list as well which is not optimal.

…dency

Compound assignments ('x += y', 'x *= y', etc) should have the
left-hand side of the assignment as a dependency.
@Conduitry Conduitry merged commit 02f5efd into sveltejs:master Oct 4, 2019
@blackwolf12333 blackwolf12333 deleted the fix_#3634_compound_operators_in_reactive_statement branch October 7, 2019 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants