You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Less Than Checker reports an error when casting an index with a constant upper bound.
Example (from Guava):
publicclassLessThanCast {
voidm() {
byte [] result = newbyte[128];
for (inti = 0; i <= 9; i++) {
result['0' + i] = (byte) i;
}
}
}
Output:
/home/vlasta/workspace/CFExperiments/src/LessThanCast.java:5: warning: [cast.unsafe] "@LessThan("9 + 1") int" may not be casted to the type "@LessThan("10") byte"
result['0' + i] = (byte) i;
^
1 warning
Expected: no warning
The text was updated successfully, but these errors were encountered:
The Less Than Checker reports an error when casting an index with a constant upper bound.
Example (from Guava):
Output:
Expected: no warning
The text was updated successfully, but these errors were encountered: