Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrectly reported warning CS1574: XML comment has cref attribute that could not be resolved #29070

Open
tmat opened this issue Aug 4, 2018 · 4 comments
Labels
Area-Compilers Bug Concept-Diagnostic Clarity The issues deals with the ease of understanding of errors and warnings.
Milestone

Comments

@tmat
Copy link
Member

tmat commented Aug 4, 2018

Repro:

Checkout branch of #29069 (if not merged yet) and open

src\VisualStudio\Core\Impl\CodeModel\CodeModelTaskExtensions.cs

Change doc comment:

  /// <summary>
  /// Does a Roslyn.Utilities.TaskExtensions.WaitAndGetResult{T} for CodeModel.
  /// </summary>

to

  /// <summary>
  /// Does a <see cref="Roslyn.Utilities.TaskExtensions.WaitAndGetResult{T}"/> for CodeModel.
  /// </summary>

Expected:

No warning.

Actual:

warning CS1574: XML comment has cref attribute 'WaitAndGetResult{T}' that could not be resolved

Calling method:

Roslyn.Utilities.TaskExtensions.WaitAndGetResult<T>(task, cancellationToken);

in the method body works, so the method is definitely accessible in this context.

@sharwell
Copy link
Member

sharwell commented Aug 6, 2018

From my understanding of cref behavior, this is not a bug. I pointed out the offending line that caused this in #29069.

@tmat
Copy link
Member Author

tmat commented Aug 6, 2018

How do you explain that calling the method directly works? At least the error message needs to be improved if indeed its ambiguous.

@sharwell
Copy link
Member

sharwell commented Aug 6, 2018

How do you explain that calling the method directly works?

Only one of the definitions provides IVT to the call site. cref isn't bound by IVT restrictions.

@tmat
Copy link
Member Author

tmat commented Aug 6, 2018

I see.

@jaredpar jaredpar added Concept-Diagnostic Clarity The issues deals with the ease of understanding of errors and warnings. Bug labels Aug 20, 2018
@jaredpar jaredpar added this to the Unknown milestone Aug 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Bug Concept-Diagnostic Clarity The issues deals with the ease of understanding of errors and warnings.
Projects
None yet
Development

No branches or pull requests

4 participants