Skip to content

Diff not working with records #32

@m0ose

Description

@m0ose

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions