RFR: 8345438: Invalid error for return in early construction context lambda [v2]
Vicente Romero
vromero at openjdk.org
Wed Dec 4 19:44:40 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.
lgtm
-------------
Marked as reviewed by vromero (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/22531#pullrequestreview-2479742335
More information about the compiler-dev
mailing list