checker-framework
checker-framework copied to clipboard
Confusing wildcard-related error with Resource Leak Checker
So most of the problems went away. However, now I can see a weird one:
[javac] Compiling 1 source file to /home/jlewandowski/dev/cassandra/c18239-static-analysis/build/checkerframework-output
[javac] /home/jlewandowski/dev/cassandra/c18239-static-analysis/src/java/org/apache/cassandra/utils/IntervalTree.java
[javac] /home/jlewandowski/dev/cassandra/c18239-static-analysis/src/java/org/apache/cassandra/utils/IntervalTree.java:345: error: [mustcall:bound] incompatible bounds in wildcard
[javac] C min = pointSerializer.deserialize(in);
[javac] ^
[javac] type: ?[ extends @MustCall Object super C[ extends @MustCallUnknown Comparable<?> super @MustCallUnknown Void]]
[javac] upper bound: @MustCall Object
[javac] lower bound: C[ extends @MustCallUnknown Comparable<?[ extends @MustCall Object super C]> super @MustCallUnknown Void]
[javac] /home/jlewandowski/dev/cassandra/c18239-static-analysis/src/java/org/apache/cassandra/utils/IntervalTree.java:346: error: [mustcall:bound] incompatible bounds in wildcard
[javac] C max = pointSerializer.deserialize(in);
[javac] ^
[javac] type: ?[ extends @MustCall Object super C[ extends @MustCallUnknown Comparable<?> super @MustCallUnknown Void]]
[javac] upper bound: @MustCall Object
[javac] lower bound: C[ extends @MustCallUnknown Comparable<?[ extends @MustCall Object super C]> super @MustCallUnknown Void]
[javac] 2 errors
That can be reproduced with the following command:
ant cf-only '-Dcf.check.only=**/IntervalTree.java'
on this branch: https://github.com/jacek-lewandowski/cassandra/tree/checker-framework-testing
Originally posted by @jacek-lewandowski in https://github.com/typetools/checker-framework/issues/6077#issuecomment-1640221392
@smillst does this look like #979 to you?
@smillst does this look like #979 to you?
No, there's no type argument inference on these lines.