mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-15 14:16:39 +00:00
Fix for erroneous use of val in basic fors.
This commit is contained in:
1 parent
cd139f4635
commit
d9572c05b1
1 file changed
+3
-1
@@ -128,7 +128,9 @@ public class PatchVal {
|
||||
|
||||
if (!isVal(local.type, scope)) return false;
|
||||
|
||||
if (new Throwable().getStackTrace()[2].getClassName().contains("ForStatement")) return false;
|
||||
StackTraceElement[] st = new Throwable().getStackTrace();
|
||||
if (st.length > 2 && st[2].getClassName().contains("ForStatement")) return false;
|
||||
if (st.length > 8 && st[8].getClassName().contains("ForStatement")) return false;
|
||||
|
||||
Expression init = local.initialization;
|
||||
if (init == null && Reflection.initCopyField != null) {
|
||||
|
||||
Reference in new issue
Block a user