Integrated: 8336786: VerifyError with lambda capture and enclosing instance references

Liam Miller-Cushon cushon at openjdk.org
Fri Jul 19 21:55:38 UTC 2024


On Fri, 19 Jul 2024 16:13:46 GMT, Liam Miller-Cushon <cushon at openjdk.org> wrote:

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

This pull request has now been integrated.

Changeset: 939fe000
Author:    Liam Miller-Cushon <cushon at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/939fe000a96bc7c92c7b8814eb6ee66856718e4e
Stats:     57 lines in 4 files changed: 53 ins; 1 del; 3 mod

8336786: VerifyError with lambda capture and enclosing instance references

Reviewed-by: mcimadamore

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

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


More information about the compiler-dev mailing list