Community
Participate
Working Groups
Cheetah (from CVS as of few minutes ago) fails to compile the following code with error message "Type mismatch: cannot convert from RandomAccess to ArrayList<?>". javac as of b59 accepts the code. ============================================== package test.cheetah; import java.util.ArrayList; public class ConditionalAndWildcard { public void test(boolean param) { ArrayList<?> ls = (param) ? new ArrayList<String>() : new ArrayList<Object>(); } } ==============================================
Our lowerUpperBound algorithm did not properly infer that ArrayList<String> and ArrayList<Object> had a better common supertype than Object, which is: ArrayList<? extends Object>. Fixed, added regression test GenericTypeTest#test270.
Fixed