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

Diff not working with records #32

Open
m0ose opened this issue Dec 18, 2024 · 0 comments · May be fixed by replaysMike/TypeSupport#24
Open

Diff not working with records #32

m0ose opened this issue Dec 18, 2024 · 0 comments · May be fixed by replaysMike/TypeSupport#24

Comments

@m0ose
Copy link

m0ose commented Dec 18, 2024

Diff hangs when using records. This leads to a nearly infinite loop. After 25 seconds, it prints that there are 21460 differences. If I remove the record keyword it works as expected.

using AnyDiff;

record class Cat(string name, bool claws, int age);

Cat black = new Cat("Whiskers", true, 3);
Cat calico= new Cat("Whiskers", true, 3);

var diff2 = AnyDiff.AnyDiff.Diff(black, calico);

Console.WriteLine(diff2.Count);

edit: It does work fine if you change record class to record struct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant