-
Notifications
You must be signed in to change notification settings - Fork 379
Open
Description
import org.checkerframework.checker.nullness.qual.Nullable;
public class Test {
class A<X> {
X field;
A(X val) {this.field = val;}
class B<Y> {
X get() { return A.this.field; }
}
}
void test(A<@Nullable String>.B<@Nullable String> b) {
b.get().hashCode();
}
public static void main(String[] args) {
Test t = new Test();
t.test(t.new A<@Nullable String>(null).new B<@Nullable String>());
}
}
This passes the Nullness Checker but throws an NPE at runtime. I think there should be an error reported inside test()
at the de-reference of b.get()
.