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

Disallow InlineArray attribute on a record struct type. #74072

Merged
merged 3 commits into from
Jun 21, 2024

Conversation

AlekseyTs
Copy link
Contributor

Closes #73504.

@AlekseyTs AlekseyTs requested a review from a team as a code owner June 20, 2024 12:20
@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Issues and PRs which have not yet been triaged by a lead label Jun 20, 2024
@@ -7983,4 +7983,7 @@ To remove the warning, you can use /reference instead (set the Embed Interop Typ
<data name="IDS_FeatureAllowsRefStructConstraint" xml:space="preserve">
<value>allows ref struct constraint</value>
</data>
<data name="ERR_InlineArrayAttributeOnRecord" xml:space="preserve">
<value>Attribute 'System.Runtime.CompilerServices.InlineArray' cannot be applied to a record struct.</value>
Copy link
Member

Choose a reason for hiding this comment

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

Should we also add an entry to breaking changes doc?

Copy link
Member

@jcouv jcouv left a comment

Choose a reason for hiding this comment

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

LGTM Thanks (iteration 1) modulo breaking change doc question

@jcouv jcouv self-assigned this Jun 20, 2024
@AlekseyTs AlekseyTs requested a review from jcouv June 20, 2024 15:24

## InlineArray attribute on a record struct type is no longer allowed.

***Introduced in Visual Studio 2022 version 17.12***
Copy link
Member

@jjonescz jjonescz Jun 20, 2024

Choose a reason for hiding this comment

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

I think if you merge this week it will go into VS 17.11, but that's probably not very important.

@AlekseyTs AlekseyTs enabled auto-merge (squash) June 20, 2024 16:43
@AlekseyTs AlekseyTs merged commit bd9da1b into dotnet:main Jun 21, 2024
24 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Jun 21, 2024
@jjonescz jjonescz modified the milestones: Next, 17.11 P3 Jun 24, 2024
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.

Record structs with InlineArray attribute compares only by the first value.
4 participants