-
Bug
-
Resolution: Fixed
-
P3
-
8, 9
-
b48
-
generic
-
generic
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8085330 | emb-9 | Joel Borggrén-Franck | P3 | Resolved | Fixed | team |
The following test fails with a CCE:
public class MethodReferenceTestPrivateTypeConversion {
interface ISi { int m(Short a); }
public static void main(String[] args) {
(new MethodReferenceTestPrivateTypeConversion()).testUnboxObjectToNumberWiden();
}
public void testUnboxObjectToNumberWiden() {
ISi q = (new E<Short>())::xI;
q.m((short)77);
}
class E<T> {
private T xI(T t) { return t; }
}
}
The <Short> info is lost and the type of the result (before conversion to the functional interface type) is needed.
Maurizio suggests that something like preserving the type computed by Attr into the JCMemberReference tree should be done.
This problem exists before and after the change from reference bridging to reference to lambda conversion for 8037404 et. al.
public class MethodReferenceTestPrivateTypeConversion {
interface ISi { int m(Short a); }
public static void main(String[] args) {
(new MethodReferenceTestPrivateTypeConversion()).testUnboxObjectToNumberWiden();
}
public void testUnboxObjectToNumberWiden() {
ISi q = (new E<Short>())::xI;
q.m((short)77);
}
class E<T> {
private T xI(T t) { return t; }
}
}
The <Short> info is lost and the type of the result (before conversion to the functional interface type) is needed.
Maurizio suggests that something like preserving the type computed by Attr into the JCMemberReference tree should be done.
This problem exists before and after the change from reference bridging to reference to lambda conversion for 8037404 et. al.
- backported by
-
JDK-8085330 ClassCastException: typing information needed for method reference bridging not preserved
- Resolved
- duplicates
-
JDK-8065303 Complex method reference conversion fails unbox case
- Closed
- relates to
-
JDK-8071310 Tests missing for checkin for JDK-8046977
- Closed
-
JDK-8037404 javac NPE or VerifyError for code with constructor reference of inner class
- Closed