Duplicate :
|
This code: import java.lang.annotation.ElementType; import java.lang.annotation.Target; interface IntUnaryOperator { Integer apply(Integer i); } class Test { IntUnaryOperator x = (@TA Integer y) -> y + 1; } @Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER}) @interface TA { } provokes a crash in javac.