Skip to content

Commit c638aff

Browse files
authored
Coerce lazy-seq as list node (#180)
1 parent 2f09def commit c638aff

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/rewrite_clj/node/coercer.cljc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,9 @@
198198
(coerce [sq]
199199
(seq-node vector-node sq))
200200
#?(:clj clojure.lang.IPersistentList :cljs List)
201+
(coerce [sq]
202+
(seq-node list-node sq))
203+
#?(:clj clojure.lang.LazySeq :cljs LazySeq)
201204
(coerce [sq]
202205
(seq-node list-node sq))
203206
#?(:clj clojure.lang.Cons :cljs Cons)

test/rewrite_clj/node/coercer_test.cljc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
#{} :set :seq
6060
#{1 2 3} :set :seq
6161
(cons 1 [2 3]) :list :seq
62+
(lazy-seq [1 2 3]) :list :seq
6263

6364
;; date
6465
#inst "2014-11-26T00:05:23" :token :token))

0 commit comments

Comments
 (0)