I tried to simplify a problem that I have in my code base with the type checking of Checker Framework. Here is the Java code:
interface Base<A, B extends A> {}
static class Sub<A, B extends A> implements Base<A, B> {}
static class Main {
List<Base<?,?>> list;
}
and this is the error I get when compiling.
error: [type.argument] incompatible type argument for type parameter B of Base.
List<Base<?,?>> list;
^
found : @Initialized @NonNull Object
required: capture#01 extends @Initialized @Nullable Object
How am I supposed to annotate this to "just work" correctly?
Might be related to #7210
I tried to simplify a problem that I have in my code base with the type checking of Checker Framework. Here is the Java code:
and this is the error I get when compiling.
How am I supposed to annotate this to "just work" correctly?
Might be related to #7210