<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <font size="4"><font face="monospace">I think the approach is right,
        the specific list of stuff might need to be reviewed more
        carefully (specifically, I've not thought through the connection
        with inner classes, which we've now opened the door to.)  Let's
        call it a placeholder and we'll make sure to review it more
        carefully after you've worked through the implementation and
        caught any obvious gaps?</font></font><br>
    <br>
    <div class="moz-cite-prefix">On 2/7/2023 12:52 PM, Archie Cobbs
      wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:CANSoFxuQbAyB+eWdzL6GGUQp14ZMEWoEK8+psoQxM9ZHAESZjA@mail.gmail.com">
      
      <div dir="ltr">
        <div dir="ltr">
          <div>Ping to Brian...</div>
          <div><br>
          </div>
          <div>Any thoughts or comments on the proposed description
            below for "pre-initialization context"?</div>
          <div><br>
          </div>
          <div>I went ahead and added it into the JEP draft but am happy
            to adjust as needed.</div>
          <div><br>
          </div>
          <div>Thanks,</div>
          <div>-Archie</div>
          <div><br>
          </div>
        </div>
        <div class="gmail_quote">
          <div dir="ltr" class="gmail_attr">On Thu, Feb 2, 2023 at 3:49
            PM Archie Cobbs <<a href="mailto:archie.cobbs@gmail.com" moz-do-not-send="true" class="moz-txt-link-freetext">archie.cobbs@gmail.com</a>>
            wrote:<br>
          </div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px
            0.8ex;border-left:1px solid
            rgb(204,204,204);padding-left:1ex">
            <div dir="ltr">
              <div dir="ltr">On Thu, Feb 2, 2023 at 2:16 PM Brian Goetz
                <<a href="mailto:brian.goetz@oracle.com" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">brian.goetz@oracle.com</a>>
                wrote:</div>
              <div class="gmail_quote">
                <blockquote class="gmail_quote" style="margin:0px 0px
                  0px 0.8ex;border-left:1px solid
                  rgb(204,204,204);padding-left:1ex">
                  <div> <font size="4"><font face="monospace">This can
                        be amended to:<br>
                        <br>
                        An explicit constructor invocation statement
                        introduces an _pre-initialization context_,
                        which limits the use of constructs that refer to
                        the current object.  Notably, the keywords
                        `this` and `super` are prohibited in a
                        pre-initialization context, as are unqualified
                        references to instance variables and instance
                        methods of lexically enclosing declarations.</font></font></div>
                </blockquote>
                <div><br>
                </div>
                <div>That might not work. For example, this source is
                  legal (as it should be) and yet the 'this' keyword
                  appears within the super() call:</div>
                <div><br>
                </div>
                <div style="margin-left:40px"><span style="font-family:monospace">$ cat Outer.java <br>
                    public class Outer {<br>
                    <br>
                        public int x;<br>
                    <br>
                        public Outer(int x) {<br>
                            this.x = x;<br>
                        }<br>
                    <br>
                        public class Inner extends Outer {<br>
                            public Inner() {<br>
                                super(Outer.this.x + 10);<br>
                            }<br>
                        }<br>
                    <br>
                        public static void main(String[] args) {<br>
                            System.out.println(new Outer(10).new
                    Inner().x);<br>
                        }<br>
                    }<br>
                    $ java -cp classes Outer<br>
                    20<br>
                  </span></div>
                <div><br>
                </div>
                <div>What about something like this?</div>
                <div><br>
                </div>
                <blockquote class="gmail_quote" style="margin:0px 0px
                  0px 0.8ex;border-left:1px solid
                  rgb(204,204,204);padding-left:1ex">
                  <div>An explicit constructor invocation statement
                    introduces a <i>pre-initialization context</i>,
                    which includes the prologue of the constructor and
                    the explicit constructor invocation statement, and
                    which prohibits the use of constructs that refer
                    explicitly or implicitly to the current object.
                    These include <span style="font-family:monospace">this</span>
                    or <span style="font-family:monospace">super</span>
                    referring to the current object, unqualified
                    references to instance variables or instance methods
                    of the current object, method references referring
                    to instance methods of the current object, and
                    instantiations of inner classes of the current
                    object's class for which the current object is the
                    enclosing instance (ยง8.1.3).</div>
                </blockquote>
              </div>
            </div>
          </blockquote>
          <div> </div>
        </div>
        -- <br>
        <div dir="ltr" class="gmail_signature">Archie L. Cobbs<br>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>