aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/javac
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2010-11-08 16:01:19 +0100
committerReinier Zwitserloot <reinier@zwitserloot.com>2010-11-08 16:01:19 +0100
commit3855a2171bbcb1c256f67ddd815526797364219c (patch)
tree3f2029edcaa4bff88763f4fd1b4d2b8d853fc857 /src/core/lombok/javac
parent09cebbdc59c118bb31f7e2fdf328ed60a03385c7 (diff)
downloadlombok-3855a2171bbcb1c256f67ddd815526797364219c.tar.gz
lombok-3855a2171bbcb1c256f67ddd815526797364219c.tar.bz2
lombok-3855a2171bbcb1c256f67ddd815526797364219c.zip
Delombok on files with only 'val' in them, without --force, didn't do anything. Fixed.
Diffstat (limited to 'src/core/lombok/javac')
-rw-r--r--src/core/lombok/javac/handlers/HandleVal.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/lombok/javac/handlers/HandleVal.java b/src/core/lombok/javac/handlers/HandleVal.java
index f806ae6c..7161a7c3 100644
--- a/src/core/lombok/javac/handlers/HandleVal.java
+++ b/src/core/lombok/javac/handlers/HandleVal.java
@@ -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());