Based anonymous classes have a weird end position

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 16
    • Affects Version/s: 16
    • Component/s: tools
    • None
    • b28

      Consider code like:
      ---
      class Test {
          class I {}
          static Object I = new Test().new I() {};
      }
      ---

      The 'new Test().new I() {}' snippet is represented by NewClassTree, which contains a ClassTree for the actual anonymous class. That nested ClassTree has a synthesized extends clause, which is "Test.I". But, this synthesized clause has a wrong end position - it is the end position of the anonymous class (it is not completely clear what are the best positions for the synthesized tree, but the end of the whole anonymous class seems definitely incorrect, and is inconsistent with the value for non-based anonymous classes).

            Assignee:
            Jan Lahoda
            Reporter:
            Jan Lahoda
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: