From 8adaa7ae7e9f5f3191798853f1e9c5f8cf6ce22a Mon Sep 17 00:00:00 2001 From: chandera Date: Tue, 25 Mar 2014 10:59:53 -0700 Subject: [PATCH] Fixing an issue where Go To Definition didn't work inside inferred field initializers in anonymous types. (changeset 1214467) --- .../LanguageServices/VisualBasicSemanticFactsService.vb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Src/Workspaces/VisualBasic/LanguageServices/VisualBasicSemanticFactsService.vb b/Src/Workspaces/VisualBasic/LanguageServices/VisualBasicSemanticFactsService.vb index 5eb22cad45a..e01dd391a17 100644 --- a/Src/Workspaces/VisualBasic/LanguageServices/VisualBasicSemanticFactsService.vb +++ b/Src/Workspaces/VisualBasic/LanguageServices/VisualBasicSemanticFactsService.vb @@ -124,7 +124,8 @@ Namespace Microsoft.CodeAnalysis.VisualBasic Dim q = From node In token.GetAncestors(Of SyntaxNode)() Where Not TypeOf node Is AggregationRangeVariableSyntax AndAlso Not TypeOf node Is CollectionRangeVariableSyntax AndAlso - Not TypeOf node Is ExpressionRangeVariableSyntax + Not TypeOf node Is ExpressionRangeVariableSyntax AndAlso + Not TypeOf node Is InferredFieldInitializerSyntax Let symbol = semanticModel.GetDeclaredSymbol(node, cancellationToken) Where symbol IsNot Nothing AndAlso symbol.Locations.Contains(location) Select symbol -- GitLab