extend trivial method reference to support lambdas, convertible to method references

This commit is contained in:
Anna.Kozlova
2017-08-07 16:00:10 +02:00
parent 2a21a01d70
commit fe61fc50e0
8 changed files with 69 additions and 15 deletions
@@ -0,0 +1,7 @@
// "Replace with qualifier" "true"
class Test {
void f(Runnable runnable) {
Runnable r = runnable;
}
}
@@ -0,0 +1,7 @@
// "Replace with qualifier" "true"
class Test {
void f(Runnable runnable) {
Runnable r = () -> runna<caret>ble.run();
}
}
@@ -0,0 +1,8 @@
// "Replace with qualifier" "false"
import java.util.function.Predicate;
class Test {
void foo(Predicate<String> p){
Predicate<String> stringPredicate = t -> p.te<caret>st("");
}
}