RFR: 8335159: Move method reference to lambda desugaring before Lower
Vicente Romero
vromero at openjdk.org
Wed Jun 26 11:35:14 UTC 2024
On Wed, 26 Jun 2024 11:00:23 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
> As we recently [moved](https://github.com/openjdk/jdk/pull/19836) the translation of "simple" method references from `LambdaToMethod` to `Lower`, it became clearer that this step in fact would benefit from running even *earlier*, as it depends on the synthetic casts generated by `TransTypes` (e.g. if one or more desugared lambda parameters have a type that is either an intersection or a union type).
> Moving the translation earlier would allow us not to *guess* which casts would need to be introduced, and just running `TransTypes::translate` on the desugaring code would take into account the type mismatches.
looks good
src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TransTypes.java line 630:
> 628: */
> 629: boolean isPrivateInOtherClass(JCMemberReference tree) {
> 630: assert !target.runtimeUseNestAccess();
nit: this assertion can be removed
-------------
Marked as reviewed by vromero (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/19903#pullrequestreview-2141529630
PR Review Comment: https://git.openjdk.org/jdk/pull/19903#discussion_r1654644729
More information about the compiler-dev
mailing list