Details
-
Type:
Defect
-
Status:
Closed
-
Resolution: Completed
-
Affects Version/s: None
-
Fix Version/s: Release 1.1
-
Component/s: None
-
Labels:None
-
Approval:Ok
Description
children does not check the node type.
Reported by Justin Balthrop on #clojure.
To reproduce:
(-> (clojure.core/vector-zip '[(1 2) (3 4)]) clojure.zip/down clojure.zip/down) descends into the list, where it should not.
Proposed fix:
children should check branch? and throw an exception if the node is actually a leaf.
Patch attached.
Converted from http://www.assembla.com/spaces/clojure/tickets/135
Attachments:
zip-children-bug.diff - https://www.assembla.com/spaces/clojure/documents/cqC9AaydWr3PjFeJe5afGb/download/cqC9AaydWr3PjFeJe5afGb