aboutsummaryrefslogtreecommitdiff
path: root/src/delombok
diff options
context:
space:
mode:
authorRawi01 <Rawi01@users.noreply.github.com>2023-03-21 22:36:50 +0100
committerRoel Spilker <r.spilker@gmail.com>2023-03-22 10:22:34 +0100
commit3b968fe57c3f816a27e5d57f1bf6060d6e4c4b4e (patch)
tree0b4996aa8c849b82a5953f6cef5ae37d1e7a2358 /src/delombok
parent780b75b0cb59a41ffaceba1c511833775b75df6e (diff)
downloadlombok-3b968fe57c3f816a27e5d57f1bf6060d6e4c4b4e.tar.gz
lombok-3b968fe57c3f816a27e5d57f1bf6060d6e4c4b4e.tar.bz2
lombok-3b968fe57c3f816a27e5d57f1bf6060d6e4c4b4e.zip
Fix binding patterns in delombok in Java 14+15
Diffstat (limited to 'src/delombok')
-rw-r--r--src/delombok/lombok/delombok/PrettyPrinter.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/delombok/lombok/delombok/PrettyPrinter.java b/src/delombok/lombok/delombok/PrettyPrinter.java
index b8b38da9..35dd9d76 100644
--- a/src/delombok/lombok/delombok/PrettyPrinter.java
+++ b/src/delombok/lombok/delombok/PrettyPrinter.java
@@ -1434,7 +1434,13 @@ public class PrettyPrinter extends JCTree.Visitor {
void printBindingPattern(JCTree tree) {
JCTree var = readObject(tree, "var", tree);
- printVarDef0((JCVariableDecl) var);
+ if (var instanceof JCVariableDecl) {
+ printVarDef0((JCVariableDecl) var);
+ } else {
+ print((JCExpression) readObject(var, "vartype", null));
+ print(" ");
+ print((Name) readObject(var, "name", null));
+ }
}
void printDefaultCase(JCTree tree) {