-
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
Ensure proper definite assignment analysis for an inline array that is not supported by language. #69212
Conversation
…s not supported by language.
@@ -11863,10 +11883,20 @@ | |||
{ | |||
public T _element0; | |||
} | |||
|
|||
[System.Runtime.CompilerServices.InlineArray(1)] | |||
public ref struct Buffer2Ref |
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.
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.
Buffer1Ref?
There isn't a requirement like that.
[System.Runtime.CompilerServices.InlineArray(1)] | ||
public ref struct Buffer1Ref | ||
{ | ||
public ref int _element2; |
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.
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.
Consider renaming to _element0 so it's clear the name is not important.
The name is distinct so that it is easy to see what line causes an error. I will keep it as is.
@jjonescz, @dotnet/roslyn-compiler For the second review |
Relates to test plan #67826