Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8029787

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 8
    • 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.

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

              Created:
              Updated:
              Resolved: