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.
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.
- duplicates
-
JDK-8029721 javac crash for annotated parameter type of lambda in a field
-
- Closed
-