fix in findLoop

pull/118/head
Jon Eugster 2 years ago
parent 4e12c749e0
commit 0f161b39aa

@ -689,8 +689,8 @@ partial def findLoops (arrows : HashMap Name (HashSet Name)) : List Name := Id.r
continue continue
-- `findLoopsAux` returns a loop or `[]` together with a set of nodes it visited on its -- `findLoopsAux` returns a loop or `[]` together with a set of nodes it visited on its
-- search starting from `node` -- search starting from `node`
let (loop, moreVisited) := (findLoopsAux arrows node) let (loop, moreVisited) := (findLoopsAux arrows node (visited := visited))
visited := visited.insertMany moreVisited visited := moreVisited
if !loop.isEmpty then if !loop.isEmpty then
return loop.toList return loop.toList
return [] return []

Loading…
Cancel
Save