rcf icon indicating copy to clipboard operation
rcf copied to clipboard

RCF rewriting varadic fns (fn [& xs]) wrong

Open dustingetz opened this issue 3 years ago • 2 comments

(def vector' (fn [& xs] (apply vector xs)))
(tests
  (vector 1 2 3) := [1 2 3]
  (vector' 1 2 3) := [1 2 3])
✅✅
(tests
  (vector 1 2 3) := [1 2 3]
  (def vector' (fn [& xs] (apply vector xs)))
  (vector' 1 2 3) := [1 2 3])
✅
ERROR in () (:)
expected: (hyperfiddle.rcf/= (vector' 1 2 3) [1 2 3])
  actual: clojure.lang.ArityException: Wrong number of args (3) passed to: dustin.y2022.missionary-faq/eval8620/vector'--8625

dustingetz avatar Sep 01 '22 16:09 dustingetz

Fixed in https://github.com/hyperfiddle/rcf/commit/83b90b423775220c2448513b11036b2a65ad17c7

dustingetz avatar Sep 01 '22 16:09 dustingetz

reopening for unit tests

dustingetz avatar Sep 01 '22 16:09 dustingetz