Skip to content

Commit d3a9444

Browse files
anmonteirodnolen
authored andcommitted
CLJS-1568: LazyTransformer doesn't implement IMeta
1 parent 68524a8 commit d3a9444

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/main/cljs/cljs/core.cljs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3780,6 +3780,9 @@ reduces them without incurring seq initialization"
37803780
(-with-meta [this new-meta]
37813781
(LazyTransformer. stepper first rest new-meta))
37823782

3783+
IMeta
3784+
(-meta [this] meta)
3785+
37833786
ICollection
37843787
(-conj [this o]
37853788
(cons o (-seq this)))

src/test/cljs/cljs/core_test.cljs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1507,7 +1507,9 @@
15071507
(is (= (sequence xform data) '(36 200 10))))
15081508
(let [xf (map #(+ %1 %2))]
15091509
(is (= (sequence xf [0 0] [1 2]) [1 2])))
1510-
))
1510+
(is (= (-> (sequence (map inc) [1 2 3])
1511+
(with-meta {:a 1})
1512+
meta) {:a 1}))))
15111513

15121514
(deftest test-obj-equiv
15131515
(testing "Object equiv method"

0 commit comments

Comments
 (0)