JDK-8029787 : javac, crash when type annotations are applied to lambda expressions used as field initializers
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 8
  • Priority: P3
  • Status: Resolved
  • Resolution: Duplicate
  • Submitted: 2013-12-08
  • Updated: 2013-12-09
  • Resolved: 2013-12-09
Related Reports
Duplicate :  
Description
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.