add instantiating point of the anonymous class as call point only if anonymous class is immediately passed as argument (IDEA-140031)

(cherry picked from commit 08f7813)
This commit is contained in:
Maxim.Mossienko
2015-05-20 11:53:16 +02:00
parent 916d36d7ec
commit 185016ae0b
4 changed files with 8 additions and 28 deletions
@@ -1,15 +0,0 @@
abstract class A {
A(int a) {}
abstract void g();
void h() {
f();
}
void f() {
A x = new A(42) {
void g() {}
};
}
}
@@ -1,5 +0,0 @@
<node text="A.A(int) ()" base="true">
<node text="Anonymous in f() in A ()">
<node text="A.h() ()"/>
</node>
</node>
@@ -57,10 +57,6 @@ public class JavaCallHierarchyTest extends HierarchyViewTestBase {
doJavaCallTypeHierarchyTest("A", "main", "B.java", "A.java");
}
public void testAnonymous() throws Exception {
doJavaCallTypeHierarchyTest("A", "A", "A.java");
}
public void testAnonymous2() throws Exception {
doJavaCallTypeHierarchyTest("A", "doIt", "A.java");
}