From 488950520441b8604d0ba7d7e25bbd7a5ce91908 Mon Sep 17 00:00:00 2001 From: Yogthos Date: Tue, 30 Jun 2026 23:24:47 -0400 Subject: [PATCH] fix corpus crash on 'replace on a seq is lazy' The :expected was a bare list "(0 :a 2)", but run-corpus evals :expected as source, so it applied 0 as a fn -> "0 cannot be cast to IFn". Every other list-valued :expected is self-evaluating; this one slipped in unquoted. Vectorize it to [0 :a 2], matching what regen-corpus.clj produces. --- test/chez/corpus.edn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/chez/corpus.edn b/test/chez/corpus.edn index 7c5c1f8..80fee3a 100644 --- a/test/chez/corpus.edn +++ b/test/chez/corpus.edn @@ -2156,7 +2156,7 @@ {:suite "seq / overlay-migrated fns" :label "replace preserves nil val" :expected "[1 nil 3]" :actual "(replace {2 nil} [1 2 3])"} {:suite "seq / overlay-migrated fns" :label "replace on a vector stays a vector" :expected "true" :actual "(vector? (replace {1 :a} [1 2 1]))"} {:suite "seq / overlay-migrated fns" :label "replace on a seq returns a seq" :expected "true" :actual "(seq? (replace {1 :a} (list 1 2 1)))"} - {:suite "seq / overlay-migrated fns" :label "replace on a seq is lazy" :expected "(0 :a 2)" :actual "(take 3 (replace {1 :a} (range)))"} + {:suite "seq / overlay-migrated fns" :label "replace on a seq is lazy" :expected "[0 :a 2]" :actual "(take 3 (replace {1 :a} (range)))"} {:suite "seq / overlay-migrated fns" :label "take-last" :expected "[3 4]" :actual "(take-last 2 [1 2 3 4])"} {:suite "seq / overlay-migrated fns" :label "take-last empty -> nil" :expected "nil" :actual "(take-last 2 [])"} {:suite "seq / overlay-migrated fns" :label "take-last n>len" :expected "[1 2]" :actual "(take-last 9 [1 2])"}