aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2011-11-20 17:23:33 +0100
committerReinier Zwitserloot <reinier@zwitserloot.com>2011-11-20 19:04:31 +0100
commit3b921ad7f6a485287ae62e64d0f4a2859683732a (patch)
tree1748aa69689121c032cb31b8e721e6dae42c4719 /src/core
parent52ee15bdc13ab66c833863d75581f6ccae3081ce (diff)
downloadlombok-3b921ad7f6a485287ae62e64d0f4a2859683732a.tar.gz
lombok-3b921ad7f6a485287ae62e64d0f4a2859683732a.tar.bz2
lombok-3b921ad7f6a485287ae62e64d0f4a2859683732a.zip
Fix for issue 299: labels would break 'val' in javac.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/lombok/javac/JavacResolution.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/lombok/javac/JavacResolution.java b/src/core/lombok/javac/JavacResolution.java
index e0d56b85..29f261c6 100644
--- a/src/core/lombok/javac/JavacResolution.java
+++ b/src/core/lombok/javac/JavacResolution.java
@@ -221,6 +221,11 @@ public class JavacResolution {
}
}
+ /*
+ * We need to dig down to the level of the method or field declaration or (static) initializer block, then attribute that entire method/field/block using
+ * the appropriate environment. So, we start from the top and walk down the node tree until we hit that method/field/block and stop there, recording both
+ * the environment object (`env`) and the exact tree node (`copyAt`) at which to begin the attr process.
+ */
private static final class EnvFinder extends JCTree.Visitor {
private Env<AttrContext> env = null;
private Enter enter;