E.g., for this code:
@NullMarked
public class Test {
static class Box<T extends @Nullable Object> {
private final T value;
Box(T value) {
this.value = value;
}
T get() {
return value;
}
}
void test() {
// should report no error
var inferredFromInitializer = new Box<>(null);
}
}
We should be able to infer that inferredFromInitializer has type Box<@Nullable Object>; right now we do not. Possibly related to #1532 .
E.g., for this code:
We should be able to infer that
inferredFromInitializerhas typeBox<@Nullable Object>; right now we do not. Possibly related to #1532 .