[CLJS-394] PersistentTreeSet lookup bug Created: 15/Oct/12 Updated: 15/Oct/12 Resolved: 15/Oct/12 |
|
| Status: | Resolved |
| Project: | ClojureScript |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Defect | Priority: | Major |
| Reporter: | Erik Ouchterlony | Assignee: | Unassigned |
| Resolution: | Completed | Votes: | 0 |
| Labels: | bug, patch | ||
| Attachments: |
|
| Patch: | Code and Test |
| Description |
|
The lookup function in PersistentTreeSet behaves differently in clojurescript than in clojure when a custom comparison function is used. If two elements are evaluated as equal, one of then is in the set and we do a lookup on the other, clojure returns the element in the set, whereas clojurescript returns the lookup element. (let [compare-quot-2 #(compare (quot %1 2) (quot %2 2)) Should return: 1 |
| Comments |
| Comment by David Nolen [ 15/Oct/12 10:02 PM ] |
|
fixed, http://github.com/clojure/clojurescript/commit/409fcc9a824668207953b2bc47d40aaab85191d3 |