We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Signedness checker complains about comparison between two char.
char
private static boolean isWhitespace(char c) { return c <= '\u0020'; }
Gives the following error:
error: [comparison.unsignedlhs] comparison has an unsigned LHS return c <= '\u0020'; ^
From JLS https://docs.oracle.com/javase/specs/jls/se9/html/jls-5.html#jls-5.1.2
A widening conversion of a char to an integral type T zero-extends the representation of the char value to fill the wider format.
Comparison between two char should be safe.
The text was updated successfully, but these errors were encountered:
Add test for issue typetools#5166
268b203
Add test for issue #5166
7533784
I agree that the code you gave should pass type-checking. It seems to do so; see pull request #5167.
What version of the Checker Framework are you using?
Sorry, something went wrong.
Thanks good to know it's already fixed. I'm on a very old version. Will update.
8edc5ad
Successfully merging a pull request may close this issue.
Signedness checker complains about comparison between two
char
.Gives the following error:
From JLS https://docs.oracle.com/javase/specs/jls/se9/html/jls-5.html#jls-5.1.2
Comparison between two
char
should be safe.The text was updated successfully, but these errors were encountered: