-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Avoid reporting redundant and possibly misleading WRN_InlineArrayNotSupportedByLanguage #74283
Conversation
…upportedByLanguage Fixes dotnet#73556.
@cston, @dotnet/roslyn-compiler For the second review |
1 similar comment
@cston, @dotnet/roslyn-compiler For the second review |
// (12,7): warning CS9184: 'Inline arrays' language feature is not supported for an inline array type that is not valid as a type argument, or has element type that is not valid as a type argument. | ||
// S _f; | ||
Diagnostic(ErrorCode.WRN_InlineArrayNotSupportedByLanguage, "_f").WithLocation(12, 7) | ||
// (3,12): warning CS9184: 'Inline arrays' language feature is not supported for an inline array type that is not valid as a type argument, or has element type that is not valid as a type argument. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning CS9184: 'Inline arrays' language feature is not supported for an inline array type that is not valid as a type argument, or has element type that is not valid as a type argument.
Is this warning correct? Couldn't S1<T>
be used as a type argument a type C<T> where T : allows ref struct
? #Resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this warning correct?
In a general case a ref
struct cannot be used as a type argument. That is the case the warning refers to. If that will be confusing, we will be able to adjust the wording in the future.
Fixes #73556.