mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
extend trivial method reference to support lambdas, convertible to method references
This commit is contained in:
+7
@@ -0,0 +1,7 @@
|
||||
// "Replace with qualifier" "true"
|
||||
|
||||
class Test {
|
||||
void f(Runnable runnable) {
|
||||
Runnable r = runnable;
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Replace with qualifier" "true"
|
||||
|
||||
class Test {
|
||||
void f(Runnable runnable) {
|
||||
Runnable r = () -> runna<caret>ble.run();
|
||||
}
|
||||
}
|
||||
+8
@@ -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("");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user