[code-reflection] Integrated: Ensure this capture is noted for use in argument of JCNewClass

Paul Sandoz psandoz at openjdk.org
Mon Mar 31 21:33:42 UTC 2025


On Mon, 31 Mar 2025 20:49:47 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:

> The `QuotableLambdaCaptureScanner` scanner neglected to visit the arguments of tree node `JCNewClass` so for say:
> 
> 
> () -> new String(toString());
> 
> 
> The implicit use of `this` in `this.toString()` would be skipped, and results in an exception later as there was no block parameter declared corresponding to `this`.

This pull request has now been integrated.

Changeset: db8897ab
Author:    Paul Sandoz <psandoz at openjdk.org>
URL:       https://git.openjdk.org/babylon/commit/db8897ab03367d11a8b220ace5565c11882bc7a9
Stats:     64 lines in 3 files changed: 64 ins; 0 del; 0 mod

Ensure this capture is noted for use in argument of JCNewClass

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

PR: https://git.openjdk.org/babylon/pull/376


More information about the babylon-dev mailing list