-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
In my screenshot I'll sepparate this repro into three files so the VSCode UI helps a bit to see the problem.
class A {
void m1() {}
void m2() {
m1();
}
}
class B extends A {
@override
void m2() {
m1();
}
@override
void m1() {
print('B.m1');
}
}
void f1(B m) {
m
..m2()
..m1();
}
class C extends A {
@override
void m1 () {}
@override
void m2() {
m1();
}
}Here you can see that in the above structure B and C are subclasses of A. In this example, m1 is called under A.m2, B.m2, C.m2 and under f1.
If you look for references of A.m1 you get all calls to it in the list.
Now the problem; if you ask for references for B.m1 or C.m1 you get the same unrelated results:
Here you can see that when asking for references of C.m1 I get instance calls that would never be C. Inside B and f1 in this case.
The same happens if you ask for references of B.m1, you get the call under C.m2 which could never be a B instance.
I'd like to ask for this to be worked on so that only B instances (or another subclass instance) would show. For C.m1 for example, I was expecting only the call inside A.m2 and C.m2. Definitelly not the call under f1 or B.m2.

