File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/Workspaces/Core/Portable/FindSymbols/FindReferences/Finders Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -608,12 +608,12 @@ protected static SymbolUsageInfo GetSymbolUsageInfo(
608608 while ( syntaxFacts . IsQualifiedName ( topNameNode . Parent ) )
609609 topNameNode = topNameNode . Parent ;
610610
611- var parent = topNameNode . GetRequiredParent ( ) ;
611+ var parent = topNameNode ? . Parent ;
612612
613613 // typeof/sizeof are a special case where we don't want to return a TypeOrNamespaceUsageInfo, but rather a ValueUsageInfo.Name.
614614 // This brings it in line with nameof(...), making all those operators appear in a similar fashion.
615- if ( parent . RawKind == syntaxFacts . SyntaxKinds . TypeOfExpression ||
616- parent . RawKind == syntaxFacts . SyntaxKinds . SizeOfExpression )
615+ if ( parent ? . RawKind == syntaxFacts . SyntaxKinds . TypeOfExpression ||
616+ parent ? . RawKind == syntaxFacts . SyntaxKinds . SizeOfExpression )
617617 {
618618 return new ( ValueUsageInfo . Name , typeOrNamespaceUsageInfoOpt : null ) ;
619619 }
You can’t perform that action at this time.
0 commit comments