Skip to content

Commit 241331d

Browse files
bronsastuarthalloway
authored andcommitted
CLJ-1633: fix PersistentList/creator handling of ArraySeqs
Signed-off-by: Stuart Halloway <stu@cognitect.com>
1 parent ad88833 commit 241331d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/jvm/clojure/lang/PersistentList.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ final protected Object doInvoke(Object args) {
2929
{
3030
Object[] argsarray = ((ArraySeq) args).array;
3131
IPersistentList ret = EMPTY;
32-
for(int i = argsarray.length - 1; i >= 0; --i)
32+
for(int i = argsarray.length - 1; i >= ((ArraySeq)args).i; --i)
3333
ret = (IPersistentList) ret.cons(argsarray[i]);
3434
return ret;
3535
}

test/clojure/test_clojure/sequences.clj

+3
Original file line numberDiff line numberDiff line change
@@ -1205,3 +1205,6 @@
12051205
(float-array [2.0 -2.5]) [2.0 -2.5]
12061206
(double-array [1.2 -3.5]) [1.2 -3.5]
12071207
(char-array [\H \i]) [\H \i]))
1208+
1209+
(deftest CLJ-1633
1210+
(is (= ((fn [& args] (apply (fn [a & b] (apply list b)) args)) 1 2 3) '(2 3))))

0 commit comments

Comments
 (0)