IDEA-145958 Suggest chained calls of expected type in basic & autopopup completion

GitOrigin-RevId: b2d1ed10839ffac236b724c224f856e6bb99cb14
This commit is contained in:
Peter Gromov
2020-06-15 15:02:03 +03:00
committed by intellij-monorepo-bot
parent 60db1bd88c
commit 3aea481c1f
12 changed files with 203 additions and 137 deletions
@@ -0,0 +1,13 @@
class Bar {
Goo getGoo();
}
class Goo {}
class Foo {
Bar getBar() {}
void x(Goo unmatched) {
Goo g = getG<caret>
}
}
@@ -0,0 +1,13 @@
class Bar {
Goo getGoo();
}
class Goo {}
class Foo {
Bar getBar() {}
void x(Goo unmatched) {
Goo g = getBar().getGoo();<caret>
}
}
@@ -2,7 +2,7 @@ import foo.bar.*;
import foo.baz.Baz;
class Main {
void foo() throws ReflectiveOperationException {
Class<Annotation> aType = Baz.class;
Class<Baz> aType = Baz.class;
Test.class.getAnnotation(<caret>);
}
}
@@ -2,7 +2,7 @@ import foo.bar.*;
import foo.baz.Baz;
class Main {
void foo() throws ReflectiveOperationException {
Class<Annotation> aType = Baz.class;
Class<Baz> aType = Baz.class;
Test.class.getAnnotation(aType);
}
}
@@ -1,12 +1,7 @@
class A{
class B{
int fooo(){
}
}
int fooo(){
A b = null;
A a = null;
return fo<caret>
return a.fooo();<caret>
}
}
@@ -1,11 +1,6 @@
class A{
class B{
int fooo(){
}
}
int fooo(){
A b = null;
A a = null;
return fo<caret>
}