-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Description
Version Used:
Roslyn that shipped in VS 17.2.5
In this line:
| var hintTextEndToken = GetHintTextEndToken(node); |
hintTextEndToken is default (for node internal record PdbFilePathResult(string PdbFilePath);), so hintSpan: TextSpan.FromBounds(startPosition, hintTextEndToken.Span.End) is getting passed the startPosition and 0, which results in this exception when invoking Go To Definition on an interface defined in metadata, for which we have source link.
System.ArgumentOutOfRangeException: 'end' must not be less than 'start'
Parameter name: end
at Microsoft.CodeAnalysis.Text.TextSpan.FromBounds(Int32 start, Int32 end) in C:\Roslyn\src\Compilers\Core\Portable\Text\TextSpan.cs:line 194
| Microsoft.CodeAnalysis | TextSpan.FromBounds Line 194 | |
| Microsoft.CodeAnalysis.CSharp.Features | CSharpStructureHelpers.<CollectCommentBlockSpans>g__TryGetLeadingCollapsibleSpan|12_0 Line 287 | |
| Microsoft.CodeAnalysis.CSharp.Features | CSharpStructureHelpers.CollectCommentBlockSpans Line 254 | |
| Microsoft.CodeAnalysis.CSharp.Features | TypeDeclarationStructureProvider.CollectBlockSpans Line 26 | |
| Microsoft.CodeAnalysis.Features | AbstractSyntaxNodeStructureProvider`1.CollectBlockSpans Line 34 | |
| Microsoft.CodeAnalysis.Features | BlockSpanCollector.GetBlockSpans Line 66 | |
| Microsoft.CodeAnalysis.Features | BlockSpanCollector.Collect Line 56 | |
| Microsoft.CodeAnalysis.Features | BlockSpanCollector.CollectBlockSpans Line 41 | |
| Microsoft.CodeAnalysis.Features | AbstractBlockStructureProvider.ProvideBlockStructure Line 42 | |
| Microsoft.CodeAnalysis.Features | BlockStructureServiceWithProviders.GetBlockStructure Line 80 | |
| Microsoft.CodeAnalysis.Features | BlockStructureServiceWithProviders.<GetBlockStructureAsync>d__5.MoveNext Line 56 |