dotnet/roslyn

Incorrect xml documentation id for generic class constructor

Open

#11.687 geöffnet am 1. Juni 2016

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)C# (4.257 Forks)batch import
Area-CompilersBugConcept-APIhelp wanted

Repository-Metriken

Stars
 (20.414 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 6T 17h) (256 gemergte PRs in 30 T)

Beschreibung

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

Contributor Guide