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 struct with List or IEnumerable property fails Should BeEquivalentTo #1808
Comments
I suspect FA treats the |
I suspect the same. |
Hi @kijanawoodard, @dennisdoomen, In your opinion, could FA try a best guess based on some clues? Having System.ValueType as base type is of course necessary, but how wrong could FA be if it finds a compiler generated op_Inequality and op_Equality, for example? I appreciate that they may be manually overridden, but I have a gut feeling that we wouldn't want FA to do member comparison in this case anyways. What do you think? |
Hi @dennisdoomen, @kijanawoodard, |
Before you file a bug, have you:
Description
A
record struct
which contains aList
orIEnumberable
failsBeEquivalentTo
Complete minimal example reproducing the issue
Expected behavior:
The test should pass, by default, just like with a
record
/record class
Actual behavior:
Versions
Additional Information
record
andclass
works fine.This is related to #1507 and #1451.
I tried
options => options.ComparingRecordsByMembers()
, but that did not work.options => options.ComparingByMembers<Foo>()
does work.The text was updated successfully, but these errors were encountered: