Comparing a sorted-set with numbers to a set with keywords is not symmetric:
The latter case should return false instead of throwing.
Cause: APersistentMap.equiv() and APersistentSet.equiv() do not expect this exception be thrown from the containsKey()/contains() check.
Proposed: It would probably be best for PersistentTreeMap and PersistentTreeMap to implement equiv() and handle that possibility appropriately. Should also consider similar changes in equals() if necessary.
See also: CLJ-1983 (downstream example with clojure.data/diff)
Screened by: Alex Miller
Updated patch to only handle equals/equiv
Rich: TreeSet extends AbstractSet and uses its equals() implementation - that impl checks for ClassCastException and returns null. http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/8u40-b25/java/util/AbstractSet.java?av=f#96
updated patch to fix indentation