diff options
Diffstat (limited to 'src/core/lombok/eclipse/handlers/HandleVal.java')
-rw-r--r-- | src/core/lombok/eclipse/handlers/HandleVal.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/lombok/eclipse/handlers/HandleVal.java b/src/core/lombok/eclipse/handlers/HandleVal.java index a280c500..d4ae417c 100644 --- a/src/core/lombok/eclipse/handlers/HandleVal.java +++ b/src/core/lombok/eclipse/handlers/HandleVal.java @@ -68,5 +68,9 @@ public class HandleVal extends EclipseASTAdapter { localNode.addError("'val' is not allowed in old-style for loops"); return; } + + if (local.initialization != null && local.initialization.getClass().getName().equals("org.eclipse.jdt.internal.compiler.ast.LambdaExpression")) { + localNode.addError("'val' is not allowed with lambda expressions."); + } } } |