From 462aedcfc3a6948d2f09659961122b8eb2e35fc7 Mon Sep 17 00:00:00 2001 From: Rawi01 Date: Thu, 25 Mar 2021 19:47:59 +0100 Subject: [fixes #2787] Handle right hand side of assignment first --- test/transform/resource/before/ValInLambda.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test/transform/resource/before') diff --git a/test/transform/resource/before/ValInLambda.java b/test/transform/resource/before/ValInLambda.java index a5364f8e..6750d045 100644 --- a/test/transform/resource/before/ValInLambda.java +++ b/test/transform/resource/before/ValInLambda.java @@ -1,5 +1,8 @@ // version 8: +import java.util.function.Function; +import java.util.function.Supplier; + import lombok.val; class ValInLambda { @@ -25,4 +28,12 @@ class ValInLambda { lombok.val fooInner = (System.currentTimeMillis() > 0) ? (Runnable)()-> {} : System.out::println; }; } + + public void inParameter() { + val foo = (Function, String>) s -> s.get(); + val foo2 = foo.apply(() -> { + val bar = ""; + return bar; + }); + } } -- cgit