[fixes #2787] Handle right hand side of assignment first

This commit is contained in:
Rawi01 authored and Roel Spilker committed 2021-04-01 21:54:33 +02:00
1 parent 9b3e84717d
commit 462aedcfc3
4 files changed
+32 -1

No files matched your search

@@ -1,3 +1,5 @@
import java.util.function.Function;
import java.util.function.Supplier;
import lombok.val;
class ValInLambda {
Runnable foo = (Runnable) () -> {
@@ -24,4 +26,11 @@ class ValInLambda {
} : System.out::println);
};
}
public void inParameter() {
final @val java.util.function.Function<java.util.function.Supplier<java.lang.String>, java.lang.String> foo = (Function<Supplier<String>, String>) (<no type> s) -> s.get();
final @val java.lang.String foo2 = foo.apply(() -> {
final @val java.lang.String bar = "";
return bar;
});
}
}