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
fix(51225): Go-to-definition on case or default should jump to the containing switch statement if available. #51236
base: main
Are you sure you want to change the base?
Conversation
|
@microsoft-github-policy-service agree |
1613057
to
7b3a71a
Compare
|
Can you add one more test? switch (null) {
case null:
export /*start*/default 123;
}Validate that it doesn't jump to the |
Is it normal that b and goes to c? This is how it works now and looks like a bug. It is expected that there will be no go to anywhere. |
|
It's questionable, but I wouldn't get hung up on fixing that specific case. |
256cc27
to
26decab
Compare
d3e1701
to
d7575ab
Compare
…ntaining switch statement if available.
This looks good but the tests dont verify contextSpan is coming out correct.
Also should context be switch keyword plus expression or just expression.. Probably expression is fine but i am not sure if editor works out ok if context span is mutually exclusive with definition span.. (dont think we have had that)
# Conflicts: # src/services/goToDefinition.ts
|
@sheetalkamat I changed contextSpan to keyword + expression, but i can't find any examples for testing contextSpan with fourslash |
|
Good to go @sheetalkamat? |


Fixes #51225