updated for version 7.3.055
Problem: Recursively nested lists and dictionaries cause a near-endless
loop when comparing them with a copy. (ZyX)
Solution: Limit recursiveness in a way that non-recursive structures can
still be nested very deep.
Files: src/eval.c, src/testdir/test55.in, src/testdir/test55.ok
diff --git a/src/testdir/test55.in b/src/testdir/test55.in
index 7d0008e..0cac348 100644
--- a/src/testdir/test55.in
+++ b/src/testdir/test55.in
@@ -342,7 +342,18 @@
:$put =(d == d)
:$put =(l != deepcopy(l))
:$put =(d != deepcopy(d))
+:"
+:" compare complex recursively linked list and dict
+:let l = []
+:call add(l, l)
+:let dict4 = {"l": l}
+:call add(dict4.l, dict4)
+:let lcopy = deepcopy(l)
+:let dict4copy = deepcopy(dict4)
+:$put =(l == lcopy)
+:$put =(dict4 == dict4copy)
:endfun
+:"
:call Test(1, 2, [3, 4], {5: 6}) " This may take a while
:"
:delfunc Test