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

Cannot reference super before supertype constructor has been called

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 18
    • Fix Version/s: 18
    • Component/s: tools
    • Labels:
      None
    • Subcomponent:
    • Introduced In Build:
      b07
    • Introduced In Version:
      18
    • Resolved In Build:
      b27

      Description

      Pull request #4376 regressed compilation of all inner classes using <enclosing class>.super pattern in their constructor argument to fail with:
       error: cannot reference super before supertype constructor has been called

      Following source fragment can be used as a minimal test case:
          class EnclClass {
              class InnerClass extends Exception {
                  InnerClass() {
                      super(EnclClass.super.toString());
                  }
              }
          }

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              asotona Adam Sotona
              Reporter:
              asotona Adam Sotona
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: