RFR: 8336786: VerifyError with lambda capture and enclosing instance references
Liam Miller-Cushon
cushon at openjdk.org
Fri Jul 19 16:18:46 UTC 2024
Hi, please consider this fix for [JDK-8336786](https://bugs.openjdk.org/browse/JDK-8336786). After [JDK-8334037](https://bugs.openjdk.org/browse/JDK-8334037) the handling of capturing `this` in lambdas does not handle synthetic `this` variables declared in supertypes in different packages. This change adjusts the lowering of `this` references to be owned by the enclosing class, instead of the superclass, so they are handle correctly be the capture logic in `capturedDecl` in `LambdaToMethod`.
-------------
Commit messages:
- 8336786: VerifyError with lambda capture and enclosing instance references
Changes: https://git.openjdk.org/jdk/pull/20259/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20259&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8336786
Stats: 55 lines in 3 files changed: 52 ins; 1 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/20259.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/20259/head:pull/20259
PR: https://git.openjdk.org/jdk/pull/20259
More information about the compiler-dev
mailing list