-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P2
-
Affects Version/s: 6
-
Component/s: tools
This program compiles with b71,
but fails to compile with earlier mustang builds
import java.util.*;
public class rr {
public static void main(String[] args) throws Throwable {
List<?> x1 = new ArrayList<Integer>();
List<?> x2 = new ArrayList<Integer>();
x1.addAll(x2);
}
}
The expected error is:
rr.java:8: cannot find symbol
symbol : method addAll(java.util.List<capture of ?>)
location: interface java.util.List<capture of ?>
x1.addAll(x2);
^
1 error
(although the error message could be improved)
but fails to compile with earlier mustang builds
import java.util.*;
public class rr {
public static void main(String[] args) throws Throwable {
List<?> x1 = new ArrayList<Integer>();
List<?> x2 = new ArrayList<Integer>();
x1.addAll(x2);
}
}
The expected error is:
rr.java:8: cannot find symbol
symbol : method addAll(java.util.List<capture of ?>)
location: interface java.util.List<capture of ?>
x1.addAll(x2);
^
1 error
(although the error message could be improved)
- relates to
-
JDK-5049523 Inference should compute glb of type arguments
-
- Closed
-