Completed
Details
Assignee
UnassignedUnassignedReporter
Nicola MomettoNicola MomettoLabels
Approval
OkPatch
Code and TestPriority
CriticalFix versions
Details
Details
Assignee
Unassigned
UnassignedReporter
Nicola Mometto
Nicola MomettoLabels
Approval
Ok
Patch
Code and Test
Priority
Fix versions
Created January 7, 2015 at 5:24 PM
Updated January 10, 2015 at 3:24 PM
Resolved January 10, 2015 at 3:24 PM
This should return '(2 3) but returns '(1 2 3) instead:
user=> ((fn [& args] (apply (fn [a & b] (println a b) (apply list b)) args)) 1 2 3) 1 (2 3) (1 2 3)
Note that using vector rather than list returns the correct values:
user=> ((fn [& args] (apply (fn [a & b] (println a b) (apply vector b)) args)) 1 2 3) 1 (2 3) [2 3]
The bug was reported in this stackoverflow question: https://stackoverflow.com/questions/27819418/strange-behaviour-of-clojure-trampoline and the bug identified in this comment: https://stackoverflow.com/questions/27819418/strange-behaviour-of-clojure-trampoline#comments-27821793
A simpler example of this bug:
user=> (apply list (next (clojure.lang.ArraySeq/create (object-array [1 2 3])))) (1 2 3)
Patch: CLJ-1633-v3.patch