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

8.8.7.1: Minor erroneous text in clause calculating the immediately enclosing instance of a super call

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 24
    • None
    • specification
    • b27

      PREVIEW JEP 492:

      This regards the spec change document for the *preview* feature "Flexible Constructor Bodies". In 8.8.7.1 we give new conditions regarding the calculation of the immediately enclosing instance (if any) of a super call. In one of the conditions, the text currently reads:

      "If the nearest static method declaration, static field declaration, or static initializer that encloses the **class instance creation expression** is not N, then a compile-time error occurs."

      There is no class instance creation expression - this is a cut and paste error from similar text in 15.9.2. It should read instead:

      "If the nearest static method declaration, static field declaration, or static initializer that encloses the **superclass constructor invocation** is not N, then a compile-time error occurs."

            gbierman Gavin Bierman
            gbierman Gavin Bierman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: