dotnet/roslyn

Unhandled ambiguity in doc comment completion

Ouverte

#8 326 ouverte le 2 févr. 2016

 (2 commentaires) (0 réaction) (0 personne assignée)C# (4 257 forks)batch import
Area-IDEhelp wanted

Métriques du dépôt

Stars
 (20 414 étoiles)
Métriques de merge PR
 (Merge moyen 6j 17h) (256 PRs mergées en 30 j)

Description

In the 4/3 end user preview, the IntelliSense support for <see> tags in XML documentation comments does not properly account for overloaded methods when one of the methods has an empty argument list.

Steps to reproduce

  1. Add the following methods to a class.

    public void Dispose()
    {
        Dispose(true);
        GC.SuppressFinalize(this);
    }
    
    protected virtual void Dispose(bool disposing)
    {
    }
    
  2. Within the <summary> section of a documentation comment for any method in the class, type the following (the | represents the caret, and not an actual character).

    <see cref="Dis|"/>
    
  3. Press Ctrl+Space.

Expected behavior

Since the class contains two methods with the name Dispose, the completion suggestions should include a parameter list for each reference to these methods. In particular, the list should contain the following:

  1. Dispose()
  2. Dispose(bool)

Actual behavior

The reference to the Dispose method that has an empty parameter list is missing the required parameter list. In particular, the list contains the following instead of what I expected. If the first choice is added, the compiler will produce a warning that the reference to Dispose is ambiguous.

  1. Dispose
  2. Dispose(bool)

Guide contributeur