Refactor boolean cast code, add tests#3016
Conversation
|
travis timed out - |
There was a problem hiding this comment.
Seems like a strange definition of asBoolean (I would expect Evals.asBoolean(x) to be equivalent to x != 0). But it looks like the behavior was already like this, so no need to change it here.
|
👍 LGTM, @navis when you fix the merge conflicts we can pull this in |
|
@navis there's not too many changes here, I'm fine either way |
|
@navis any chance we can finish this up? |
|
@navis ping |
3f52cbd to
c7ef019
Compare
c7ef019 to
f62203f
Compare
|
@fjy rebased on master |
|
It looks like post-rebasing this is no longer fixing anything or changing behavior (the new EvalTest passes even on master) but is instead just refactoring the boolean cast code and adding a new test. Still valuable, but I'm going to change the PR title to reflect that. |
Currently binary operators in math expr returns integer 0 or 1 for long type arguments, making following expressions regard it as a double. I think returning 0L / 1L would make it more consistent.