From df5324e2d7f2ce12b691954dd79714ad7496b406 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Wed, 15 Feb 2012 04:36:15 +0100 Subject: 'val' is no longer legal in basic for loops now. Fixes issue #346 --- src/eclipseAgent/lombok/eclipse/agent/PatchVal.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/eclipseAgent/lombok/eclipse/agent') diff --git a/src/eclipseAgent/lombok/eclipse/agent/PatchVal.java b/src/eclipseAgent/lombok/eclipse/agent/PatchVal.java index d59ff735..6563c20a 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/PatchVal.java +++ b/src/eclipseAgent/lombok/eclipse/agent/PatchVal.java @@ -120,6 +120,8 @@ public class PatchVal { if (!isVal(local.type, scope)) return false; + if (new Throwable().getStackTrace()[2].getClassName().contains("ForStatement")) return false; + Expression init = local.initialization; if (init == null && Reflection.initCopyField != null) { try { -- cgit