-
Bug
-
Resolution: Fixed
-
P2
-
6
-
b71
-
generic
-
generic
-
Verified
public class Tester {
public static <E extends Integer> void doit ( final E[] a ) {
System.out.println ( a[0] / 4 ) ;
}
public static void main ( final String[] args ) {
Tester.doit ( new Integer[] { 2 , 3 , 4 } ) ;
}
}
Tester.java:3: cannot find symbol
symbol : method intValue()
location: bound of type variable E
System.out.println ( a[0] / 4 ) ;
^
Fatal Error: Unable to find method intValue
###@###.### 2005-03-15 02:24:25 GMT
public static <E extends Integer> void doit ( final E[] a ) {
System.out.println ( a[0] / 4 ) ;
}
public static void main ( final String[] args ) {
Tester.doit ( new Integer[] { 2 , 3 , 4 } ) ;
}
}
Tester.java:3: cannot find symbol
symbol : method intValue()
location: bound of type variable E
System.out.println ( a[0] / 4 ) ;
^
Fatal Error: Unable to find method intValue
###@###.### 2005-03-15 02:24:25 GMT
- relates to
-
JDK-6227936 Wrong type of inherited method using specialized type parameter
- Closed
-
JDK-6355696 Compiler can not make boxing in a method call
- Closed