Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: go-to-definition should go to a base definition if possible. #21702

Open
ghost opened this issue Feb 6, 2018 · 1 comment
Open
Labels
Domain: Symbol Navigation Relates to go-to-definition, find-all-references, highlighting/occurrences. In Discussion Not yet reached consensus Suggestion An idea for TypeScript

Comments

@ghost
Copy link

ghost commented Feb 6, 2018

TypeScript Version: master

Code

class A {
    m() {}
}
class B extends A {
    m() {}
}

Expected behavior:

Go-to-definition on m in class B should go to m in class A. (Same if A were an interface.)

Actual behavior:

I get taken to the beginning of the current identifier.

@DanielRosenwasser
Copy link
Member

DanielRosenwasser commented Feb 6, 2018

If we do this, make sure this works if there are multiple implements clauses (some which do and some which don't declare m()) along with an extends

@mhegazy mhegazy added the Suggestion An idea for TypeScript label Feb 7, 2018
@weswigham weswigham added the In Discussion Not yet reached consensus label Nov 6, 2018
@DanielRosenwasser DanielRosenwasser added the Domain: Symbol Navigation Relates to go-to-definition, find-all-references, highlighting/occurrences. label Nov 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Domain: Symbol Navigation Relates to go-to-definition, find-all-references, highlighting/occurrences. In Discussion Not yet reached consensus Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

3 participants