mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 06:39:38 +07:00
lambda -> meth ref: varargs
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
class Example {
|
||||
public void m(String... s) {
|
||||
}
|
||||
|
||||
{
|
||||
Runnable r = this::m;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
class Example {
|
||||
public void m(String... s) {
|
||||
}
|
||||
|
||||
{
|
||||
Runnable r = () -> <caret>m();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// "Replace lambda with method reference" "false"
|
||||
import java.util.function.Function;
|
||||
class Example {
|
||||
|
||||
public String m(String... s) {
|
||||
return "";
|
||||
}
|
||||
|
||||
{
|
||||
Function<String, String> r = (s) -> m(s, s);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user