-
Notifications
You must be signed in to change notification settings - Fork 375
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: boolean operations must have boolean operands #1451
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #1451 +/- ##
==========================================
- Coverage 56.05% 56.05% -0.01%
==========================================
Files 421 421
Lines 65457 65459 +2
==========================================
Hits 36692 36692
- Misses 25897 25898 +1
- Partials 2868 2869 +1 ☔ View full report in Codecov by Sentry. |
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.
TY!
These sorts of additions of checks are always welcome.
also related to #1424 |
<!-- please provide a detailed description of the changes made in this pull request. --> Addresses gnolang#1083 This fixes an issue where there was no enforcement of operand types when doing boolean operations. The correct approach should be to verify boolean operand type expressions also evaluate to boolean typed values before proceeding. This prevents any of the behavior described in the issue that this PR addresses. <details><summary>Contributors' checklist...</summary> - [x] Added new tests, or not needed, or not feasible - [x] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [x] Updated the official documentation or not needed - [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [x] Added references to related issues and PRs - [ ] Provided any useful hints for running manual tests - [ ] Added new benchmarks to [generated graphs](https://gnoland.github.io/benchmarks), if any. More info [here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md). </details>
Addresses #1083
This fixes an issue where there was no enforcement of operand types when doing boolean operations. The correct approach should be to verify boolean operand type expressions also evaluate to boolean typed values before proceeding. This prevents any of the behavior described in the issue that this PR addresses.
Contributors' checklist...
BREAKING CHANGE: xxx
message was included in the description