Open cushon opened 9 years ago
Thank you for raising this issue. Currently, our data flow framework does not refine the qualifiers on type arguments. This is a feature we have discussed in the past and wish to include in the Checker Framework but have not yet implemented.
Cross-ref to #260. One situation where one runs into this:
import java.util.Map;
import java.util.Map.Entry;
class Demo {
void foo(Map<String, Object> m) {
for (Entry<?, ?> e : m.entrySet()) {
e.getValue().toString();
}
}
}
This gives an error on the call of toString(), because the wildcard is not refined.
The checker fails to infer a non-null type for the wildcard in
List<?> lx = ...
: