mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-01 18:58:31 +07:00
anonymous -> method ref: collapse receiver method references to raw receiver (IDEA-153261)
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
// "Replace with method reference" "true"
|
||||
import java.util.List;
|
||||
import java.util.function.Function;
|
||||
|
||||
class MyTest {
|
||||
|
||||
Function<List<?>, String> TO_TEXT = Object::toString;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// "Replace with method reference" "true"
|
||||
import java.util.List;
|
||||
import java.util.function.Function;
|
||||
|
||||
class MyTest {
|
||||
|
||||
Function<List<?>, String> TO_TEXT = new Func<caret>tion<List<?>, String>() {
|
||||
@Override
|
||||
public String apply(List<?> lst) {
|
||||
return lst.toString();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user