Integrated: 8335136: Underscore as parameter name in one-parameter functional types fails to compile

Evemose duke at openjdk.org
Thu Jun 27 07:48:13 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.

This pull request has now been integrated.

Changeset: f3b69da5
Author:    Evemose <124714317+Evemose at users.noreply.github.com>
Committer: Jan Lahoda <jlahoda at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/f3b69da55a1ec4857fff1537a80ab1fefee93dac
Stats:     137 lines in 2 files changed: 136 ins; 0 del; 1 mod

8335136: Underscore as parameter name in one-parameter functional types fails to compile

Reviewed-by: jlahoda

-------------

PR: https://git.openjdk.org/jdk/pull/19878


More information about the compiler-dev mailing list