javac 8/9 inconsistency

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Wed Feb 18 13:03:23 UTC 2015


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);
> }

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20150218/3ac69e8b/attachment.html>


More information about the compiler-dev mailing list