RFR: 8335136: Underscore as parameter name in one-parameter functional types fails to compile
Evemose
duke at openjdk.org
Wed Jun 26 12:08:10 UTC 2024
On Tue, 25 Jun 2024 11:22:00 GMT, Jan Lahoda <jlahoda 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.
>
> Hi,
>
> the change looks sensible to me, thanks. A test will be needed, though. One possible location for the test may be `test/langtools/tools/javac/switchexpr/ExpressionSwitch.java`.
@lahodaj could you review pls?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/19878#issuecomment-2191523367
More information about the compiler-dev
mailing list