import java.util.*; class B implements A { public V getT(){return null;} void foo(List> list) { for(A b : list){ V v = b.getT(); } } }