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
This error has come repeatedly in case studies where length was used as unsigned but due to weakness in signedness checker, we had to suppress the error.
Command-
javac -processor signedness ex.java
Code-
import org.checkerframework.checker.signedness.qual.*;
class ex{
void foo(String a,byte []b){
@Unsigned int len = a.length();
@Unsigned int len2 = b.length;
}
}
Output-
ex.java:4: error: [assignment.type.incompatible] incompatible types in assignment.
@Unsigned int len = a.length();
^
found : @Signed int
required: @Unsigned int
ex.java:5: error: [assignment.type.incompatible] incompatible types in assignment.
@Unsigned int len2 = b.length;
^
found : @Signed int
required: @Unsigned int
2 errors
`
The text was updated successfully, but these errors were encountered:
This error has come repeatedly in case studies where length was used as unsigned but due to weakness in signedness checker, we had to suppress the error.
Command-
Code-
Output-
The text was updated successfully, but these errors were encountered: