I actually don't know if that's the specific problem here (especially when I'm testing mostly against code that is @NullMarked), but it's a good possibility for at least 50 errors [edit: probably more like 90+?] that I'm seeing—mostly in https://github.com/google/auto, which uses some unannotated annotation-processor APIs.
import org.jspecify.annotations.NullMarked;
@NullMarked
class NullForUnspecVoid {
void x(Value val, Visitor<Void> vis) {
val.accept(vis, null);
}
}
interface Value {
<P> void accept(Visitor<P> visitor, P param);
}
interface Visitor<P> {}
I actually don't know if that's the specific problem here (especially when I'm testing mostly against code that is
@NullMarked
), but it's a good possibility for at least 50 errors [edit: probably more like 90+?] that I'm seeing—mostly in https://github.com/google/auto, which uses some unannotated annotation-processor APIs.I would expect the required type to be
Void*
, sinceVisitor
isn't annotated for nullness.This requires a way to apply defaults to type-variable usages, as discussed in https://github.com/jspecify/checker-framework/issues/7.