-
Notifications
You must be signed in to change notification settings - Fork 420
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
Changes for empty reponse for GoToDefinition on PropertyAccessorSymbol #1086
Conversation
@@ -47,6 +47,8 @@ public GotoDefinitionService(OmniSharpWorkspace workspace, MetadataHelper metada | |||
// go to definition for namespaces is not supported | |||
if (symbol != null && !(symbol is INamespaceSymbol)) | |||
{ | |||
if (symbol is IMethodSymbol methodSymbol && methodSymbol.AssociatedSymbol is IPropertySymbol) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is already the same is IMethodSymbol
2 lines lower so you may want to roll them up together and just check for IPropertySymbol
there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
@@ -31,6 +31,110 @@ class {|def:Foo|} { | |||
await TestGoToSourceAsync(testFile); | |||
} | |||
|
|||
[Fact] | |||
public async Task DoesnotReturnOnPropertAccessorGet() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: capital Not (same below)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of things to fix. Other than that, looks good. Thanks!
@@ -47,6 +47,8 @@ public GotoDefinitionService(OmniSharpWorkspace workspace, MetadataHelper metada | |||
// go to definition for namespaces is not supported | |||
if (symbol != null && !(symbol is INamespaceSymbol)) | |||
{ | |||
if (symbol is IMethodSymbol methodSymbol && methodSymbol.AssociatedSymbol is IPropertySymbol) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
merged |
Fixes: dotnet/vscode-csharp#1949
Changes:
Please review : @DustinCampbell @TheRealPiotrP @rchande