{{ message }}
Repository navigation
Commit 9c315d6
committed
Print
JDK 27 (JDK-8268850) gives a variable declared with `var` a VarTypeTree as
its type, where earlier JDKs have none. This visitor compiles against JDK 21
and has no visitVarType, so it scanned the new node to nothing and every
`var` declaration failed on JDK 27: six golden files in CI, among them
FlexibleConstructor, I959 and B380299722.
declareOne now looks for the `var` token before the type node, the same
reordering google-java-format made in google/google-java-format@075e025c94.
A binding pattern such as `Nested(var i)` has a method of its own, which
now treats a VAR_TYPE node like the missing type of the older JDKs.var from its token, now that JDK 27 gives it a type node1 parent 97358ba commit 9c315d6
2 files changed
Lines changed: 14 additions & 4 deletions
File tree
- open-java-format/src/main/java/com/palantir/javaformat/java
- java14

0 commit comments