RFR: 8345438: Invalid error for return in early construction context lambda [v2]
Archie Cobbs
acobbs at openjdk.org
Wed Dec 4 23:20:46 UTC 2024
On Wed, 4 Dec 2024 15:49:04 GMT, Archie Cobbs <acobbs at openjdk.org> wrote:
>> The "Flexible Constructors" JEP feature allows statements to appear before a `super()` invocation, but some restrictions, one of which is that `return` is not allowed. The compiler check for this was being too strict in that it was incorrectly disallowing a `return` statement that was nested inside a lambda, which is OK.
>>
>> Please review this patch to the `SuperThisChecker` which fixes this.
>
> Archie Cobbs has updated the pull request incrementally with one additional commit since the last revision:
>
> Add a few more regression tests involving lambdas.
Thanks for the reviews.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22531#issuecomment-2518752027
More information about the compiler-dev
mailing list