-
Notifications
You must be signed in to change notification settings - Fork 207
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
Boolean compound assignment operators should short-circuit if possible #2864
Comments
That should be |
* fix short-circuiting due to dart-lang/language#2864 * update operator turns out the "double" version of the operators does short-circuit
@lrhn is there a specific language version that |
|
* ♻️ 🎨 Improves structure & refactors methods * 📝 Documents changes * ⬆️ Bumps version to 2.3.6 * call remove once; other small fixes (#22) * 📝 Updates CHANGELOG * ✨ Adds pickedItemsContainerBuilder Closes #23 * ⬆️ Bumps version to 2.3.7 * 📝 Documents changes * Allow setting controllers and a couple other customizations (#24) * providable nodes and controllers * customize hint text and allow clearing field * undo input decoration * use custom picked items builder for empty lists also * re-add custom input decoration * ⬆️ Bumps version to 2.4.0 * 📝 Documents changes * 🤡 Tweaks example code * 💥 ✨ Refactors showed items with lazy loading * 🐛 Adds missed shrinkwrap * ⬆️ Bumps version to 2.4.1 * 📝 Documents changes * fix short-circuiting due to dart-lang/language#2864 (#25) * Avoid unnecessary fuzzy search (#26) * fix short-circuiting due to dart-lang/language#2864 * update operator turns out the "double" version of the operators does short-circuit * Revert "Avoid unnecessary fuzzy search (#26)" (#27) This reverts commit 7aaed22. * ⬆️ Bumps version to 2.4.2 * 📝 Updates CHANGELOG * fix: outerContainerColor (#28) * fix: outerContainerColor * fix: outerContainerDecoration * ⬆️ Bumps version to 2.4.3 * 📝Updates CHANGELOG * 🐛 Resolves decoration discrepancies --------- Co-authored-by: anqit <[email protected]> Co-authored-by: Julia Bulgakova <[email protected]>
Currently, there is an inconsistency between the behavior of boolean compound assignment operators (
|=
and&=
) and their plain syntax supposed-to-be-equivalents, in that the former does not use short-circuiting when the left operator determines the result of the boolean expression so the right operator does not need to be evaluated. This dartpad demonstrates the difference:https://dartpad.dev/?id=cab11271c6d481729b457e5a1585aa88
I believe that the assignment operators should be updated to use short-circuiting when possible.
The text was updated successfully, but these errors were encountered: