提交 b4ca4014 编写于 作者: R Ravi Chande 提交者: GitHub

Merge pull request #21815 from rchande/crefCrash

Fix documentation comment watson
......@@ -5015,5 +5015,23 @@ void S()
",
MainDescription("T Test.F<T>()"));
}
[Fact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WorkItem(403665, "https://devdiv.visualstudio.com/DevDiv/_workitems?id=403665&_a=edit")]
public async Task TestExceptionWithCrefToConstructorDoesNotCrash()
{
await TestAsync(
@"
class Test
{
/// <summary>
/// </summary>
/// <exception cref=""Test.Test""/>
public Test$$() {}
}
",
MainDescription("Test.Test()"));
}
}
}
......@@ -213,6 +213,7 @@ private static void AppendTextFromAttribute(FormatterState state, XElement eleme
var symbol = DocumentationCommentId.GetFirstSymbolForDeclarationId(crefValue, semanticModel.Compilation);
if (symbol != null)
{
format = format ?? SymbolDisplayFormat.MinimallyQualifiedFormat;
if (symbol.IsConstructor())
{
format = format.WithMemberOptions(SymbolDisplayMemberOptions.IncludeParameters | SymbolDisplayMemberOptions.IncludeExplicitInterface);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册