Details
-
Bug
-
Resolution: Fixed
-
P2
-
8
-
Verified
Description
There are programs that are not accepted by javac8, for example:
abstract class A2<T>{
abstract <S> S foo(S x, S y);
abstract <S1> void baz(A2<S1> a);
void bar(A2<Integer> y, A2<Long> x){
baz(foo(x, y));
}
}
This is due to a type inference spec change with respect to javac7. After analyzing this issue the spec has been modified to accept this kind of programs but the compiler still needs to be sync with the spec.
abstract class A2<T>{
abstract <S> S foo(S x, S y);
abstract <S1> void baz(A2<S1> a);
void bar(A2<Integer> y, A2<Long> x){
baz(foo(x, y));
}
}
This is due to a type inference spec change with respect to javac7. After analyzing this issue the spec has been modified to accept this kind of programs but the compiler still needs to be sync with the spec.
Attachments
Issue Links
- relates to
-
JDK-8030741 Inference: implement eager resolution of return types, consistent with JDK-8028800
- Closed