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

Child position on in span of parent position for enum constant with bodies

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P4
    • tbd
    • None
    • tools

    Description

      Consider code like:
      ---
      public enum E {
         A {
              int i;
          }
      }
      ---

      This is desugared in parser using anonymous class definition. But the span for the NewClassTree does not fully enclose the span of the embedded ClassTree - the NewClassTree begins at '{', but the embedded ClassTree beging at 'A'. A testcase is attached.

      Attachments

        Activity

          People

            jlahoda Jan Lahoda
            jlahoda Jan Lahoda
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: