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

Cannot reference super before supertype constructor has been called

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 18
    • 18
    • tools
    • None
    • b07
    • 18
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: