[jdk11] delombok was printing most variable declarations that are generated by lombok with ‘var’.

This commit is contained in:
Reinier Zwitserloot committed 2019-04-24 14:05:56 +02:00
1 parent b94b75c9eb
commit 0a1e872b96
1 file changed
+3 -1
+3 -1
View File
@@ -441,7 +441,9 @@ public class JavacTreeMaker {
//javac versions: 6-8
private static final MethodId<JCVariableDecl> VarDef = MethodId("VarDef");
public JCVariableDecl VarDef(JCModifiers mods, Name name, JCExpression vartype, JCExpression init) {
return invoke(VarDef, mods, name, vartype, init);
JCVariableDecl varDef = invoke(VarDef, mods, name, vartype, init);
if (varDef.vartype != null && varDef.vartype.pos == -1) varDef.vartype.pos = 0;
return varDef;
}
//javac versions: 8