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

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

    Details

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

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: