RFR: 8335136: Underscore as parameter name in one-parameter functional types fails to compile
Jan Lahoda
jlahoda at openjdk.org
Thu Jun 27 06:23:10 UTC 2024
On Tue, 25 Jun 2024 10:38:37 GMT, Evemose <duke at openjdk.org> wrote:
> Seems like this bug been around for quite a bunch of time now. Basically, in JavacParser, UNDERSCORE case havent been present in block parsing switch statement, so it was treated as default and it wasnt recognized as part of yield statement. This simple fix adds UNDERSCORE case right next to IDENTIFIER case to solve this problem. Syntax like yield _ = 3 is still invalid.
Looks good to me, thanks!
-------------
Marked as reviewed by jlahoda (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/19878#pullrequestreview-2144356242
More information about the compiler-dev
mailing list