Closed
Description
Related to the dotnet/runtime/issues/96943.
Version Used:
dotnet SDK 8.0.204
Steps to Reproduce:
- Create
record struct
withInlineArray
attribute - Call equals.
- Record structs with
InlineArray
attribute compares only by the first value.
var a1 = new A();
a1[0]=1;
a1[1]=2;
var a2 = new A();
a2[0] = 1;
a2[1] = 1;
Console.WriteLine(a1.Equals(a2));
[InlineArray(2)]
record struct A
{
public int P;
}
Expected Behavior:
Should compare all values in inline array and print false in this case.
Actual Behavior:
Compares only the first element.