RFR: 8335159: Move method reference to lambda desugaring before Lower [v3]

Maurizio Cimadamore mcimadamore at openjdk.org
Mon Jul 15 09:58:08 UTC 2024


> 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.

Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision:

  Update src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TransTypes.java
  
  Co-authored-by: Andrey Turbanov <turbanoff at gmail.com>

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/19903/files
  - new: https://git.openjdk.org/jdk/pull/19903/files/9ef90711..c4ea895a

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=19903&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=19903&range=01-02

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/19903.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/19903/head:pull/19903

PR: https://git.openjdk.org/jdk/pull/19903


More information about the compiler-dev mailing list