-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Record structs with InlineArray attribute compares only by the first value. #73504
Comments
This combination of features ( |
This is an oversight, there was no intent to support record-like behavior for inline arrays. |
Related runtime issue dotnet/runtime#96943 where we're considering changes to the default behavior of |
Discussed in LDM on the 17th. |
From https://github.com/dotnet/csharplang/blob/main/meetings/2024/LDM-2024-06-17.md#conclusion-3:
|
The runtime is changing the behavior of the default |
Related to the dotnet/runtime/issues/96943.
Version Used:
dotnet SDK 8.0.204
Steps to Reproduce:
record struct
withInlineArray
attributeInlineArray
attribute compares only by the first value.sharplab
Expected Behavior:
Should compare all values in inline array and print false in this case.
Actual Behavior:
Compares only the first element.
The text was updated successfully, but these errors were encountered: