RFR: 8336786: VerifyError with lambda capture and enclosing instance references [v4]
Liam Miller-Cushon
cushon at openjdk.org
Fri Jul 19 17:32:51 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`.
Liam Miller-Cushon has updated the pull request incrementally with one additional commit since the last revision:
Switch to a subclass test in capturedDecl
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/20259/files
- new: https://git.openjdk.org/jdk/pull/20259/files/63006204..2561a7bc
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=20259&range=03
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=20259&range=02-03
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 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