functional expression can be folded quick fix should work in case of statement lambda

This commit is contained in:
Dmitry Batkovich
2018-09-06 11:48:09 +03:00
parent 78a9247309
commit 54ee69b6df
5 changed files with 42 additions and 2 deletions
@@ -0,0 +1,8 @@
// "Replace with qualifier" "true"
import java.util.function.Function;
class Test {
void foo(Function<String, String> function) {
Function<String, String> another = function;
}
}
@@ -0,0 +1,8 @@
// "Replace with qualifier" "true"
import java.util.function.Consumer;
class Test {
void foo(Consumer<String> consumer) {
Consumer<String> another = consumer;
}
}
@@ -0,0 +1,10 @@
// "Replace with qualifier" "true"
import java.util.function.Function;
class Test {
void foo(Function<String, String> function) {
Function<String, String> another = s -> {
return function.ap<caret>ply(s);
};
}
}
@@ -0,0 +1,10 @@
// "Replace with qualifier" "true"
import java.util.function.Consumer;
class Test {
void foo(Consumer<String> consumer) {
Consumer<String> another = s -> {
consumer.acce<caret>pt(s);
};
}
}