Community
Participate
Working Groups
Following code should work, but it doesn't compile with error "Type mismatch: cannot convert from new Iterator<Map.Entry<String,Integer>>(){} to Iterator<Map.Entry<String,Integer>>" --------------------------------------- import java.util.AbstractSet; import java.util.Iterator; import java.util.Map.Entry; public class GenTest extends AbstractSet<Entry<String,Integer>> { public Iterator<Entry<String, Integer>> iterator() { return new Iterator<Entry<String,Integer>>() { public boolean hasNext() {return false;} public Entry<String, Integer> next() {return null;} public void remove() {} }; } public int size() {return 0;} } --------------------------------------- It might be related to #75134 - but I have no way to determine if this is exactly the same problem.
Verified it works works with last integration build: I200410260800... *** This bug has been marked as a duplicate of 75134 ***
Test case test361 added in GenericTypeTest