RFR: 8335136: Underscore as parameter name in one-parameter functional types fails to compile
Evemose
duke at openjdk.org
Wed Jun 26 09:37:36 UTC 2024
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.
-------------
Commit messages:
- Merge branch 'openjdk:master' into underscore-fails-as-lambda-param-in-yield
- actual bug number
- remove ^M
- test
- init
Changes: https://git.openjdk.org/jdk/pull/19878/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19878&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8335136
Stats: 137 lines in 2 files changed: 136 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/19878.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/19878/head:pull/19878
PR: https://git.openjdk.org/jdk/pull/19878
More information about the compiler-dev
mailing list