RFR: 8015831: Add lint check for calling overridable methods from a constructor [v7]
Archie L. Cobbs
duke at openjdk.org
Thu Jan 12 18:16:31 UTC 2023
On Thu, 12 Jan 2023 12:28:12 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
> This might also be related with the fact that we deal with return values in different ways than with e.g. values returned from a nested scope (where we just pop, and then copy all pending expression to the outer depth).
Yes, a method return value that represents a reference is an `ExprRef` just before the `return` is actually executed, but then it turns into a `ReturnRef`.
A `ReturnRef` is really just a yellow sticky note that reminds us "Hey whenever you finish 'executing' this method, remember that there is a reference in its return value".
> This might also be related with the fact that we deal with return values in different ways than with e.g. values returned from a nested scope (where we just pop, and then copy all pending expression to the outer depth).
Exactly.
-------------
PR: https://git.openjdk.org/jdk/pull/11874
More information about the build-dev
mailing list