Inference bug in javac: Was: enhanced enums - back from the dead?
maurizio.cimadamore at oracle.com
Wed Dec 12 11:20:11 UTC 2018
I moved this discussion to compiler-dev, where I think it belongs:
On 10/12/2018 15:43, Maurizio Cimadamore wrote:
> On 08/12/2018 12:19, forax at univ-mlv.fr wrote:
>> What i mean is that if you run this code, it throws a CCE, because a
>> String is not comparable to an Integer,
>> i believe there is a bug in javac (or the JLS) because with Foo<T
>> extends Comparable<T>> , Foo<?>::t is Object & Comparable<?> &
>> Serializable but then Comparator::comparing should not compile
>> because you can not capture the '?' of Comparable to a <U extends
>> Comparable<U>> as required by Comparator::comparing.
> I'll take another look at this, and try to reproduce w/o enums (should
> be possible)
More information about the amber-dev