Details
-
Type:
Defect
-
Status:
Open
-
Priority:
Critical
-
Resolution: Unresolved
-
Affects Version/s: Release 1.7
-
Fix Version/s: Release 1.10
-
Component/s: None
-
Labels:
-
Approval:Vetted
Description
Couldn't find whether it was brought up earlier, but it seems that empty? predicate is broken for transient collections
user=> (empty? (transient [])) IllegalArgumentException Don't know how to create ISeq from: clojure.lang.PersistentVector$TransientVector clojure.lang.RT.seqFrom (RT.java:528) user=> (empty? (transient ())) ClassCastException clojure.lang.PersistentList$EmptyList cannot be cast to clojure.lang.IEditableCollection clojure.core/transient (core.clj:3209) user=> (empty? (transient {})) IllegalArgumentException Don't know how to create ISeq from: clojure.lang.PersistentArrayMap$TransientArrayMap clojure.lang.RT.seqFrom (RT.java:528) user=> (empty? (transient #{})) IllegalArgumentException Don't know how to create ISeq from: clojure.lang.PersistentHashSet$TransientHashSet clojure.lang.RT.seqFrom (RT.java:528)
The workaround is to use (zero? (count (transient ...))) check instead.
Probably similar to
CLJ-700.CLJ-700.