diff --git a/Src/Workspaces/VisualBasic/LanguageServices/VisualBasicSemanticFactsService.vb b/Src/Workspaces/VisualBasic/LanguageServices/VisualBasicSemanticFactsService.vb index 5eb22cad45ad585bafd41d0e58005675b462adfc..e01dd391a17479b767e1fe5829cb09b49378f582 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