create method from usage: guess return types by context of the same method calls (IDEA-199042)

This commit is contained in:
Anna.Kozlova
2018-09-19 13:27:43 +02:00
parent 39bc5a4966
commit 5cec08212e
3 changed files with 26 additions and 1 deletions

View File

@@ -0,0 +1,14 @@
// "Create method 'test'" "true"
public class Test {
public Test(Impl impl) {
impl.test(test());
}
private String test() {
return null;
}
}
class Impl {
void test(String s) {}
}

View File

@@ -0,0 +1,10 @@
// "Create method 'test'" "true"
public class Test {
public Test(Impl impl) {
impl.test(te<caret>st());
}
}
class Impl {
void test(String s) {}
}