Community
Participate
Working Groups
v_616 import java.util.Collection; public class Try { void m() { Collection<? super Collection<? super Number>> coll_lower_coll_lower_number= null; java.util.List<java.lang.Number> n= null; coll_lower_coll_lower_number.add(n); } } Eclipse 3.1.1 and java 1.5.0_05 accept this, but with the current build, I get: "The method add(capture-of ? super Collection<? super Number>) in the type Collection<capture-of ? super Collection<? super Number>> is not applicable for the arguments (List<Number>)" There are a bunch of similar cases of nested wildcards, which also fail. You can extract them from the stdout of our TypeEnvironmentTests in org.eclipse.jdt.ui.tests.refactoring
Related to fix for bug 111208.
Changed CaptureBinding to only recapture the wildcard bound if the wildcard is extending its bound. Added GenericTypeTest#test846-847. Fix released both in HEAD/3.2 and 3.1.2 streams.
Verified for 3.1.2 in M20060109-0800.
Verified for 3.2M4 in I20051215-1506