File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/Compilers/VisualBasic/Portable/Symbols/Source Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -928,8 +928,10 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
928928 If _modifiedIdentifierOpt IsNot Nothing Then
929929 Return ImmutableArray.Create( Of SyntaxReference)(_modifiedIdentifierOpt.GetReference())
930930 Else
931- ' For catch variables (and potentially other cases), there is no ModifiedIdentifierSyntax.
932- ' Fall back to using the identifier token's parent (e.g., IdentifierNameSyntax for catch).
931+ ' Only catch variables should have Nothing for _modifiedIdentifierOpt
932+ Debug.Assert(DeclarationKind = LocalDeclarationKind.Catch)
933+ ' For catch variables, there is no ModifiedIdentifierSyntax.
934+ ' Fall back to using the identifier token's parent (IdentifierNameSyntax).
933935 Return ImmutableArray.Create(_identifierToken.Parent.GetReference())
934936 End If
935937 End Select
You can’t perform that action at this time.
0 commit comments