RFR: 8345438: Invalid error for return in early construction context lambda [v2]
Archie Cobbs
acobbs at openjdk.org
Wed Dec 4 15:49:04 UTC 2024
> 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.
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/22531/files
- new: https://git.openjdk.org/jdk/pull/22531/files/470684f8..0dce8b32
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=22531&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=22531&range=00-01
Stats: 63 lines in 3 files changed: 62 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/22531.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/22531/head:pull/22531
PR: https://git.openjdk.org/jdk/pull/22531
More information about the compiler-dev
mailing list