Merge pull request #9926 from 9999years/fix-cycle-detection-in-nix-repl

Fix cycle detection in `nix repl`

(cherry picked from commit e190c20c3394fd1a5cd9be1afc3f30ab32dcd36b)
Change-Id: Ie385e781b9f0b7171ca653bcd53a990bb41f9e4b
This commit is contained in:
eldritch horrors
2024-03-09 03:37:35 -07:00
parent 1bb8fe48a2
commit b6b31d255a
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -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;
}