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

15.9.2: Improve terminology around "enclosing instances"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Withdrawn
    • Icon: P4 P4
    • None
    • None
    • specification

      15.9.2 describes a process for determining an "immediately enclosing instance" of an "instance". However, the JLS elsewhere reserves the word "instance" for the runtime value of a class.
      In contrast 15.9.2 concerns entirely compile-time matters. What it is actually calculating is an implicit argument (i.e. an expression) that should be passed to the associated constructor call (which has been given an extra implicit parameter).

      The second use of the word "instance" is actually the class instance creation expression itself.

      Better terminology would speak of determining an "immediately enclosing argument" (or, perhaps, an immediately enclosing expression) of a given class instance creation expression.

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

              Created:
              Updated:
              Resolved: