relevant method chain completion: do not suggest casts for introduced variable (EA-108521)

This commit is contained in:
Dmitry Batkovich
2017-10-26 16:36:55 +03:00
parent 4eb8c6faf5
commit 60921be2e3
5 changed files with 107 additions and 49 deletions
@@ -0,0 +1,31 @@
class Main {
void m() {
D d = <caret>
}
}
class A {
}
class AImpl extends A {
B getB() {
return new B();
}
}
class B {
C getC() {
return new C();
}
}
class C {
D getD() {
return new D();
}
}
class D {
}
@@ -0,0 +1,44 @@
class Main {
void m(A a) {
((AImpl) a).getB().getC().getD();
((AImpl) a).getB().getC().getD();
((AImpl) a).getB().getC().getD();
((AImpl) a).getB().getC().getD();
((AImpl) a).getB().getC().getD();
((AImpl) a).getB().getC().getD();
((AImpl) a).getB().getC().getD();
((AImpl) a).getB().getC().getD();
((AImpl) a).getB().getC().getD();
((AImpl) a).getB().getC().getD();
((AImpl) a).getB().getC().getD();
((AImpl) a).getB().getC().getD();
((AImpl) a).getB().getC().getD();
((AImpl) a).getB().getC().getD();
}
}
class A {
}
class AImpl extends A {
B getB() {
return new B();
}
}
class B {
C getC() {
return new C();
}
}
class C {
D getD() {
return new D();
}
}
class D {
}