-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
uniform comparison result type (Bool
)
#26
uniform comparison result type (Bool
)
#26
Conversation
Following on from #23, change makes comparisons (`==`, `!=`, `<`, `<=`, `>`, `>=`) of two StaticBools return either `true` or `false` (which the other StaticTypes do under the same comparisons).
This tests StaticBool comparisons (`==`, `<`, `<=`) return Bool values, as do other StaticTypes when compared
restores StaticBool (`==`, `<`, `<=`) to yield Bool.
Codecov Report
@@ Coverage Diff @@
## master #26 +/- ##
=======================================
Coverage 98.36% 98.36%
=======================================
Files 7 7
Lines 429 429
=======================================
Hits 422 422
Misses 7 7
Continue to review full report at Codecov.
|
_lt(::False, ::True) = true | ||
_lt(::True, ::True) = false | ||
_lt(::False, ::False) = false | ||
_lt(::True, ::False) = false |
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.
hmm .. experimenting
Sorry, deleted my comments (before seeing that you already responded) because I didn't realize julia> Static.lt(static(4),static(6))
static(true) |
@JeffreySarnoff, is this ready to merge? |
Yes. It does what it says it does. Nothing more. Nothing less. |
Following up on #23,
this PR revises the comparison logic for
StaticBool
values so they result in aBool
value.This behavior matches the comparison logic for the other Static types.