Presently, calling Diff() on a self-referential value will never return.
This patch records all pointer comparisons, and before each pointer comparison, if a comparison has happened before during the same diff, indicating a cycle was detected, then the comparison does nothing.
This mimics how the standard libraries DeepEqual function works.
Presently, calling Diff() on a self-referential value will never return.
This patch records all pointer comparisons, and before each pointer comparison, if a comparison has happened before during the same diff, indicating a cycle was detected, then the comparison does nothing.
This mimics how the standard libraries DeepEqual function works.