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

15.13: Clarify how enclosing instance for inner class constructor ref is identified

    XMLWordPrintable

Details

    Description

      Clarification is requested for the process of identifying an enclosing instance for a method reference of the form Inner::new (where 'Inner' is an inner class).

      15.13.1:

      "It is a compile-time error if the method reference expression is of the form ClassType :: [TypeArguments] new and a compile-time error would occur when determining an enclosing instance for ClassType as specified in §15.9.2 (treating the method reference expression as if it were ***an unqualified*** class instance creation expression)."

      15.13:

      "The immediately enclosing instance of a new inner class instance (§15.9.2) ***is*** provided by a lexically enclosing instance of this (§8.1.3)."

      Attachments

        Activity

          People

            abuckley Alex Buckley
            dlsmith Dan Smith
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: