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

Ensure proper definite assignment analysis for an inline array that is not supported by language. #69212

Merged
merged 2 commits into from
Jul 26, 2023

Conversation

AlekseyTs
Copy link
Contributor

@AlekseyTs AlekseyTs commented Jul 25, 2023

Relates to test plan #67826

@AlekseyTs AlekseyTs requested review from jjonescz and cston July 25, 2023 16:52
@AlekseyTs AlekseyTs requested a review from a team as a code owner July 25, 2023 16:52
@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Issues and PRs which have not yet been triaged by a lead label Jul 25, 2023
@@ -11863,10 +11883,20 @@
{
public T _element0;
}

[System.Runtime.CompilerServices.InlineArray(1)]
public ref struct Buffer2Ref
Copy link
Member

@cston cston Jul 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Buffer2Ref

Buffer1Ref? #Resolved

Copy link
Contributor Author

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;
Copy link
Member

@cston cston Jul 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_element2

Consider renaming to _element0 so it's clear the name is not important.

Same comment for tests below. #Resolved

Copy link
Contributor Author

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.

@AlekseyTs
Copy link
Contributor Author

@jjonescz, @dotnet/roslyn-compiler For the second review

@AlekseyTs AlekseyTs merged commit d0c8767 into dotnet:main Jul 26, 2023
25 checks passed
@ghost ghost added this to the Next milestone Jul 26, 2023
@dibarbet dibarbet modified the milestones: Next, 17.8 P2 Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers New Feature - Inline Arrays untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants