PersistentVector and Subvec implement their IVector protocol (-assoc-n) with IAssociative (-assoc); it should be the other way around:
- Because IVector has an additional numeric index contract that IAssociative does not. The neglected number check causes (assoc  nil 1) to return  instead of throwing an exception.
- Because Java Clojure does not do this (APersistentVector.assoc does a numeric check then calls PersistentVector.assocN).
See comments in
CLJS-728 for more detailed rationales.
Patch attached which reverses this, and also fixes the error when a non-number is used as a key/index to assoc on PersistentVector and Subvec. Note: (assoc! (transient ) nil) is still broken.