Welcome! Please see the About page for a little more info on how this works.

0 votes
in core.rrb-vector by

(let [coll (into (fv/vector-of :byte) (repeat (* 32 n) 0)]
  (assoc coll i 1))

throws ClassCastException [B cannot be cast to [Ljava.lang.Object;  clojure.core.rrb-vector.nodes/reify--1261 (nodes.clj:69)

for every i < n * 32 - 32.

So you can assoc to elements in the last internal primitive array, and even extend it to create the next internal primitive array.
But you can't assoc to elements in any previous internal primitive array.

I wonder why nobody discovered this bug before...

2 Answers

0 votes

Comment made by: therasppie

I forgot to say, I'm using rrb-vector release 0.0.11.

0 votes
Reference: https://clojure.atlassian.net/browse/CRRBV-13 (reported by alex+import)