dotnet/roslyn

Incorrect xml documentation id for generic class constructor

开放

#11,687 创建于 2016年6月1日

 (1 条评论) (0 个反应) (0 位负责人)C# (4,257 个派生)batch import
Area-CompilersBugConcept-APIhelp wanted

仓库指标

星标
 (20,414 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Version Used: 1.1.1

Steps to Reproduce:

  1. Create a generic class with one or more type parameters:
    public class Class1<T>
    {
        public Class1()
        {
            Console.WriteLine("Class1"); 
        }
    }
  1. When we instantiate the class using code such as var x = new Class1<int>(), and get the symbol when cursor is at the Class1, then get the xml documentation id by calling symbol.GetDocumentationCommentId(), it will contain the actual data type System.Int32, which is incorrect.

Expected Behavior:

It should return something like this:

M:XmlDocIdTest.Class1`1.#ctor

Actual Behavior:

M:XmlDocIdTest.Class1{System.Int32}.#ctor

贡献者指南