[CLJ-1306] Cannot reduce over short arrays Created: 14/Dec/13 Updated: 14/Dec/13 Resolved: 14/Dec/13
|Affects Version/s:||Release 1.5|
Reducing over a short array currently causes an error:
(reduce + (seq (short-array 10)))
This appears to occur because ArraySeq is assumed by protocols.clj to contain an Object array in the ".array" field, when in fact it is a short array.
Proposed solution to to create ArraySeq_short (analogous to the other primitive types ArraySeq_long etc.) to handle short arrays.
|Comment by Mike Anderson [ 14/Dec/13 7:37 AM ]|
|Comment by Alex Miller [ 14/Dec/13 8:17 AM ]|
|Comment by Mike Anderson [ 14/Dec/13 9:29 AM ]|
OK, thanks Alex!
Just to be sure: Can you confirm that a fix will definitely go into 1.6? This is a defect, and as such should have a higher priority than
My patch also includes a regression test which I think could helpfully be included in the test suite.
|Comment by Alex Miller [ 14/Dec/13 11:24 AM ]|
Yes, I fully expect