(recur (inc acc) (rest xs)) re-entered the fn through its varargs collector, so the rest seq came back wrapped in a fresh 1-element rest list — xs never emptied and the interpreter hung (jolt-4df; the compile path was already correct). recur now re-enters through a dedicated entry that binds the LAST arg directly as the rest param (n-fixed + 1 args, Clojure's contract), in both the single-arity and multi-arity fn* paths; the shared body runner keeps the ns-swap/restore in one place, and fixed arities still re-dispatch through the arity dispatcher exactly as before. Six spec rows: the original repro, zero-fixed variadic, rest-empties-to-nil, multi-arity variadic recur, nil rest, and a fixed-arity control. |
||
|---|---|---|
| .. | ||
| bench | ||
| clojure-stdlib/clojure | ||
| integration | ||
| spec | ||
| support | ||
| unit | ||