javac, crash when type annotations are applied to lambda expressions used as field initializers

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P3
    • None
    • Affects Version/s: 8
    • Component/s: tools

      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.

            Assignee:
            Vicente Arturo Romero Zaldivar
            Reporter:
            Vicente Arturo Romero Zaldivar
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: