Example:
void test(List<@Nullable String> l) {
for (String s: l) {
s.hashCode(); // should report a warning
}
for (var s: l) {
s.hashCode(); // should report a warning
}
}
interface Foo<T extends @Nullable Object> { T get(); }
void test2(List<Foo<@Nullable String>> l) {
for (var foo: l) {
foo.get().hashCode(); // should report a warning
}
}
Example: