[code-reflection] RFR: Fix lambda bugs [v5]
Maurizio Cimadamore
mcimadamore at openjdk.org
Mon Sep 1 10:32:55 UTC 2025
On Tue, 26 Aug 2025 18:24:47 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:
>> Mourad Abbay has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fix bug 3
>
> test/langtools/tools/javac/reflect/QuotableSubtypeTest.java line 328:
>
>> 326: };
>> 327: """)
>> 328: // @@@ should this be the excepted behaviour in case we have a nested quotable lambda ?
>
> Yes, the program behavior is to produce an instance of a functional interface whose implementation is bound to the lambda's body. Because the lambda is also targeted to a `Quotable` interface, there is additional program behaviour that gives access to the code model of the lambda via a corresponding Quoted instance.
I'm not sure about this... I get that the inner lambda has its own synthetic method with its own code model. But, if I take the outer lambda an execute it, e.g. using the Interpreter or BytecodeGenerator, won't I then have an issue -- as we would have lost the information that the nested lambda was quotable and, as such, required different treatment?
-------------
PR Review Comment: https://git.openjdk.org/babylon/pull/532#discussion_r2313567805
More information about the babylon-dev
mailing list