From 0f0cb68eac20c6f02b77c1fade88cdad8b7d85a2 Mon Sep 17 00:00:00 2001 From: Bulgakov Alexander Date: Thu, 22 Sep 2016 14:48:41 +0300 Subject: added supporting for @val variables inside lambdas. --- test/transform/resource/after-ecj/ValFinal.java | 9 +++++++++ test/transform/resource/after-ecj/ValInLambda.java | 21 +++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 test/transform/resource/after-ecj/ValFinal.java create mode 100644 test/transform/resource/after-ecj/ValInLambda.java (limited to 'test/transform/resource/after-ecj') diff --git a/test/transform/resource/after-ecj/ValFinal.java b/test/transform/resource/after-ecj/ValFinal.java new file mode 100644 index 00000000..d7cf9cb7 --- /dev/null +++ b/test/transform/resource/after-ecj/ValFinal.java @@ -0,0 +1,9 @@ +import lombok.val; +public class ValFinal { + public ValFinal() { + super(); + } + public void test() { + final @val int x = 10; + } +} diff --git a/test/transform/resource/after-ecj/ValInLambda.java b/test/transform/resource/after-ecj/ValInLambda.java new file mode 100644 index 00000000..7669789b --- /dev/null +++ b/test/transform/resource/after-ecj/ValInLambda.java @@ -0,0 +1,21 @@ +// version 8: + +import lombok.val; +class ValInLambda { + Runnable foo = (Runnable) () -> { + final @val int i = 1; +}; + ValInLambda() { + super(); + } + public void easyLambda() { + Runnable foo = (Runnable) () -> { + final @val int i = 1; +}; + } + public void easyIntersectionLambda() { + Runnable foo = (Runnable) () -> { + final @val int i = 1; +}; + } +} -- cgit