You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That actually means there's a bug in your code and there's nothing we can do about it. Possibly you're running delombok such that the javac that's used to delombok your stuff is from pre-10. That /* missing */ isn't something we generate directly; it means the vartype field of the JCVariableDecl node is null.
You can reproduce this by trying to delombok the following in java 11:
importlombok.var; // generates an error. We want this for this test.classExample { publicvoidtest() {
varx = 10; // this will turn into /* missing */
}}
But that makes 'sense' so to speak, because var in this case neither means the keyword nor the lombok type, in a certain frame of thinking (not the most sane frame, but it's what javac11 does).
But, if you remove the error and try this, in java11:
classExample { publicvoidtest() {
varx = 10;
}}
The only way to know it was a 'var' in the original source file when errors occur is if the vartype variable is null, and otherwise, if the position of the var node is -1, which feels utterly finicky, but, hey, javac's own Attr class pulls the same crazy stunt, so, I guess ¯_(ツ)_/¯
so that's what we did. From the next release on delombok will delombok 'var' right.. though it might delombok various errors into var as well. javac authors, if you read this: Next time, just find an unused bits in the flags variable please :)
I see, in my setup (both gradle and maven) I use kapt to trigger all annotation processing, and since kotlin supports only java 1.6/1.8 I suppose javac11 is set by kapt to source code level 8 and causing those issues.
Hi,
I'v been trying to use the maven delombok plugin for a project using Java 11
var
keyword, delombok generated code likeI posted an issue in the maven plugin repository but was directed here.
The text was updated successfully, but these errors were encountered: