-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
If you request Go to Implementations on an abstract member, and there is a concrete implementation for it, you get directly moved there by VS Code (if you have more than one, it will show Peek, and you can choose an implementation to open). This command works both in the declaration or invocation of the member (in this case, A.doSomething).
If the method is not abstract, this command gives no results. This creates a small UX problem, because if I want to see the implementation of the methods below, the most consistent way of doing it is either Go to Definition and then Go to Implementations (if abstract) or try Go to Implementations first (in a package like analyzer this is what I tend to do since most classes are abstract) and if nothing happens, to Go to Definition.
But if the definition is in itself an implementation, I was expecting the Go to Implementations command to return that instead of nothing.
Repro:
abstract class A {
void doSomething();
}
class B implements A {
@override
void doSomething() {
print('Doing something in class B');
}
}
class C {
void performAction() {
print('Performing action in class C');
}
}
void foo(A a, C c) {
a.doSomething(); // Request `Go to Implementations` get moved to B.doSomething
c.performAction(); // Request `Go to Implementations` get `No implementation found for 'performAction'` message
}