<< Back to previous view

[CLJ-934] disj! throws exception when attempting to remove multiple items in one call Created: 21/Feb/12  Updated: 15/Jun/12  Resolved: 15/Jun/12

Status: Closed
Project: Clojure
Component/s: None
Affects Version/s: Release 1.2, Release 1.3, Release 1.4
Fix Version/s: Release 1.5

Type: Defect Priority: Minor
Reporter: Andy Fingerhut Assignee: Unassigned
Resolution: Completed Votes: 0
Labels: None

Attachments: Text File clj-934-transient-disj-patch-3.txt    
Patch: Code and Test
Approval: Ok

 Description   

disj! fails whenever called with multiple items to remove:

user=> (-> #{5 10 15 20} transient (disj! 10 15) persistent!)
ClassCastException clojure.lang.PersistentHashSet$TransientHashSet cannot be cast to clojure.lang.IPersistentSet clojure.core/disj (core.clj:1419)

It is a simple one line fix to disj! Clojure source code to correct this.



 Comments   
Comment by Andy Fingerhut [ 09/Mar/12 9:02 AM ]

clj-934-transient-disj-patch2.txt fixes a problem with my previous one where it had a warning during testing because of a poorly named test that conflicted with a name in clojure.core. This one is clean.

Comment by Stuart Halloway [ 08/Jun/12 10:37 AM ]

Patch 3 is same as patch 2, but nonreflective invocation.

Comment by Andy Fingerhut [ 08/Jun/12 10:42 AM ]

Removed older patch in favor of Stuart's improved one clj-934-transient-disj-patch-3.txt dated June 8, 2012.

Generated at Fri Oct 24 14:13:55 CDT 2014 using JIRA 4.4#649-r158309.