RFR: 8309054: Parsing of erroneous patterns succeeds

Aggelos Biboudis abimpoudis at openjdk.org
Mon May 29 16:00:59 UTC 2023

Moving the logic of type test pattern detection from `parsePattern` to `variableDeclaratorRest` makes the logic of the latter too complex. The regression in this JBS would be fixed by introducing two additional if-guards (e.g., `if (!typePattern)`); conditional on whether we are detecting a local variable or a type pattern. This PR removes this.


Commit messages:
 - 8309054: Parsing of erroneous patterns succeeds

Changes: https://git.openjdk.org/jdk/pull/14205/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14205&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8309054
  Stats: 75 lines in 3 files changed: 38 ins; 9 del; 28 mod
  Patch: https://git.openjdk.org/jdk/pull/14205.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/14205/head:pull/14205

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

More information about the compiler-dev mailing list