mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-15 08:17:18 +00:00
Delombok on files with only 'val' in them, without --force, didn't do anything. Fixed.
This commit is contained in:
1 parent
09cebbdc59
commit
3855a2171b
2 files changed
+5
-2
No files matched your search
@@ -65,7 +65,7 @@ public abstract class AST<A extends AST<A, L, N>, L extends LombokNode<A, L, N>,
|
||||
this.imports = Collections.unmodifiableCollection(new ArrayList<String>(imports));
|
||||
}
|
||||
|
||||
protected void setChanged() {
|
||||
public void setChanged() {
|
||||
this.changed = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -94,7 +94,10 @@ public class HandleVal extends JavacASTAdapter {
|
||||
// TODO: Fix enhanced for loops - then uncomment a bunch of lines in test/transform/resource/*/ValInFor.java
|
||||
}
|
||||
replacement = JavacResolution.typeToJCTree(type, localNode.getTreeMaker(), localNode.getAst());
|
||||
if (replacement != null) local.vartype = replacement;
|
||||
if (replacement != null) {
|
||||
local.vartype = replacement;
|
||||
localNode.getAst().setChanged();
|
||||
}
|
||||
else local.vartype = oldVarType;
|
||||
} catch (JavacResolution.TypeNotConvertibleException e) {
|
||||
localNode.addError("Cannot use 'val' here because initializer expression does not have a representable type: " + e.getMessage());
|
||||
|
||||
Reference in new issue
Block a user