diff options
-rw-r--r-- | src/libexpr/print.cc | 4 | ||||
-rw-r--r-- | tests/functional/repl.sh | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/libexpr/print.cc b/src/libexpr/print.cc index 139568b5e..c04278a0e 100644 --- a/src/libexpr/print.cc +++ b/src/libexpr/print.cc @@ -150,7 +150,7 @@ struct ImportantFirstAttrNameCmp } }; -typedef std::set<Value *> ValuesSeen; +typedef std::set<const void *> ValuesSeen; class Printer { @@ -260,7 +260,7 @@ private: void printAttrs(Value & v, size_t depth) { - if (seen && !seen->insert(&v).second) { + if (seen && !seen->insert(v.attrs).second) { printRepeated(); return; } diff --git a/tests/functional/repl.sh b/tests/functional/repl.sh index bb8b60e50..0921edc0f 100644 --- a/tests/functional/repl.sh +++ b/tests/functional/repl.sh @@ -161,7 +161,7 @@ testReplResponseNoRegex ' # Same for let expressions testReplResponseNoRegex ' let x = { y = { a = 1; }; inherit x; }; in x -' '{ x = { ... }; y = { ... }; }' +' '{ x = «repeated»; y = { ... }; }' # The :p command should recursively print sets, but prevent infinite recursion testReplResponseNoRegex ' @@ -176,4 +176,4 @@ testReplResponseNoRegex ' # Same for let expressions testReplResponseNoRegex ' :p let x = { y = { a = 1; }; inherit x; }; in x -' '{ x = { x = «repeated»; y = { a = 1; }; }; y = «repeated»; }' +' '{ x = «repeated»; y = { a = 1; }; }' |