javac 8/9 inconsistency
Anna Kozlova
anna.kozlova at jetbrains.com
Wed Feb 18 13:15:24 UTC 2015
Thanks, I’ve saw the issue but was not sure if this sample is covered.
Is it possible to make javac print what bounds it has inferred, what constraints it has processed?
Thanks,
Anna
From: Maurizio Cimadamore [mailto:maurizio.cimadamore at oracle.com]
Sent: Wednesday, February 18, 2015 2:03 PM
To: Anna Kozlova; compiler-dev at openjdk.java.net
Subject: Re: javac 8/9 inconsistency
Hi Anna,
this is an issue we know about; this is the master bug we use to keep track of such issues:
https://bugs.openjdk.java.net/browse/JDK-8039214
We did a bit of back and forth on this and as a result there is a difference between JDK 8 and JDK 9. The end result will be that this code will compile on both, but the fix used in 8 will be (very) different form the one we'll do in 9.
Maurizio
On 18/02/15 11:29, Anna Kozlova wrote:
abstract class FooBoo {
{
map((Class<? extends Annotation> ann) -> getAnnotation(ann)); //error
map(this::getAnnotation); //error
}
abstract <A> A getAnnotation(Class<A> annotationClass);
abstract <R> void map(Function<Class<? extends Annotation>, ? extends R> mapper);
}
!DSPAM:35,54e48db771362090119686!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20150218/2f8f96b7/attachment-0001.html>
More information about the compiler-dev
mailing list