mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-17 20:11:25 +07:00
process overloads to create method by method reference (IDEA-172193)
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
// "Create method 'fooBar'" "true"
|
||||
import java.util.function.Consumer;
|
||||
|
||||
class MyTest {
|
||||
public void testMethod() {
|
||||
overloadOtherParam("anything", this::fooBar);
|
||||
}
|
||||
|
||||
private void fooBar(String s) {
|
||||
<caret>
|
||||
}
|
||||
|
||||
|
||||
private void overloadOtherParam(String anything, Consumer<String> consumer) {
|
||||
}
|
||||
|
||||
private void overloadOtherParam(int anything, Consumer<String> consumer) {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// "Create method 'fooBar'" "true"
|
||||
import java.util.function.Consumer;
|
||||
|
||||
class MyTest {
|
||||
public void testMethod() {
|
||||
overloadOtherParam("anything", this::foo<caret>Bar);
|
||||
}
|
||||
|
||||
|
||||
private void overloadOtherParam(String anything, Consumer<String> consumer) {
|
||||
}
|
||||
|
||||
private void overloadOtherParam(int anything, Consumer<String> consumer) {
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user