fixes #25173; SinglyLinkedList.remove broken / AssertionDefect (#25175)

fixes #25173

(cherry picked from commit 51a9ada043)
This commit is contained in:
ringabout
2025-09-16 23:05:09 +08:00
committed by narimiran
parent edeac84e47
commit 2fbb793f4e
2 changed files with 14 additions and 0 deletions

View File

@@ -273,5 +273,17 @@ template main =
list.add(n4)
doAssert list.toSeq == @["sonic", "the", "hedgehog"]
block:
var list = initSinglyLinkedList[int]()
list.add(4)
list.remove(list.head)
list.add(5)
list.remove(list.head)
list.add(6)
static: main()
main()