RFR: 8359383: Incorrect starting positions for implicitly typed variables [v2]

Archie Cobbs acobbs at openjdk.org
Mon Aug 11 18:17:35 UTC 2025


> This fixes starting position bugs relating to implicitly typed variables; see the linked issue for details.
> 
> This also makes it possible to recover the declaration type (explicit, implicit, or `var`) from a `JCVariableDecl` and, in the case of `var` declarations, the starting position of the `var`; previously this wasn't possible.
> 
> Finally, as a minor drive-by improvement, we can now pretty print `var` as `var` instead of `/*missing*/`.

Archie Cobbs has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:

 - Add back regression test case that got removed somehow.
 - Merge branch 'master' into JDK-8359383
 - Fix various starting position bugs relating to implicitly typed variables.

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/25786/files
  - new: https://git.openjdk.org/jdk/pull/25786/files/1272b52d..af4ef40b

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=25786&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=25786&range=00-01

  Stats: 96928 lines in 2468 files changed: 54412 ins; 28080 del; 14436 mod
  Patch: https://git.openjdk.org/jdk/pull/25786.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/25786/head:pull/25786

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


More information about the compiler-dev mailing list