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

CS1580 fired with a paramater that is generic and nullable (xml doc) #38401

Closed
vsfeedback opened this issue Aug 29, 2019 · 2 comments
Closed
Assignees
Labels
Area-Compilers Bug Developer Community The issue was originally reported on https://developercommunity.visualstudio.com Feature - Nullable Reference Types Nullable Reference Types Resolution-Duplicate The described behavior is tracked in another issue
Milestone

Comments

@vsfeedback
Copy link

vsfeedback commented Aug 29, 2019

This issue has been moved from a ticket on Developer Community.


I'm using VS2019 16.1.1 (in VS2017 15.9.12 this does not happen)
The app is using .net core 2.2, and the analyzers Microsoft.CodeAnalysis.FxCopAnalyzers 2.9.2
StyleCop.Analyzers 1.1.118

I have method with this definition:

public static bool HasValue<T>(this T? source) where T : struct

and in a xml doc I have this:

/// <summary>
/// Internally uses <see cref="TypeValidations.HasValue{T}(T?) "/>.
/// </summary>

In VS2019 this fires the error:

Error CS1580 Invalid type for parameter T? in XML comment cref attribute: 'TypeValidations.HasValue{T}(T?) '

If I change the documentation to TypeValidations.HasValue{T}(Nullable{T}) now I got an analyzer error (SA1125) telling me that I should use the shorthand notation for nullable types.


Original Comments

Visual Studio Feedback System on 5/30/2019, 07:14 PM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

Visual Studio Feedback System on 6/10/2019, 02:19 AM:

This issue is currently being investigated. Our team will get back to you if either more information is needed, a workaround is available, or the issue is resolved.

Visual Studio Feedback System on 6/10/2019, 04:13 AM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.


Original Solutions

(no solutions)

@RikkiGibson
Copy link
Contributor

Seems like maybe a duplicate of #33782. Tagging @jcouv

@jcouv jcouv self-assigned this Aug 30, 2019
@jcouv jcouv added this to the 16.4 milestone Aug 30, 2019
@jaredpar jaredpar added the Bug label Sep 4, 2019
@jaredpar
Copy link
Member

jaredpar commented Sep 9, 2019

Closing as a duplicate.

@jaredpar jaredpar closed this as completed Sep 9, 2019
@jaredpar jaredpar added the Resolution-Duplicate The described behavior is tracked in another issue label Sep 9, 2019
@sharwell sharwell added the Developer Community The issue was originally reported on https://developercommunity.visualstudio.com label Nov 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Bug Developer Community The issue was originally reported on https://developercommunity.visualstudio.com Feature - Nullable Reference Types Nullable Reference Types Resolution-Duplicate The described behavior is tracked in another issue
Projects
None yet
Development

No branches or pull requests

5 participants