-
Notifications
You must be signed in to change notification settings - Fork 271
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
Equals/NotEquals operator is now sometimes showing inconsistent behavior #428
Labels
Comments
stevenylai
changed the title
Equals/NotEquals operator is now sometimes showing inconsistent behaviro
Equals/NotEquals operator is now sometimes showing inconsistent behavior
Jan 12, 2024
Than you for finding this. |
uklimaschewski
added a commit
that referenced
this issue
Jan 15, 2024
uklimaschewski
added a commit
that referenced
this issue
Jan 15, 2024
uklimaschewski
added a commit
that referenced
this issue
Jan 15, 2024
uklimaschewski
added a commit
that referenced
this issue
Jan 15, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Related the change from : #421 where we switched from
equals
tocompareTo
Now for the below 2 expressions:
a == ""
"" == a
If evaluated with
a = 0
, first one will returntrue
because left side is a number, andEvaluationValue.compareTo
will attempt to convert the right side to a number value as well, and as long as string is not a valid boolean, it will be converted to0
. Likewise, when left side is string, right side will also be converted to a string hence 2 returnsfalse
Before the change the 2 expressions above are both
false
which seems to make more sense to me. Perhaps we need to check type for the operator?The text was updated successfully, but these errors were encountered: