File tree Expand file tree Collapse file tree 3 files changed +15
-5
lines changed
Expand file tree Collapse file tree 3 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -3614,7 +3614,13 @@ reduces them without incurring seq initialization"
36143614 (-conj [coll o] (cons o coll))
36153615
36163616 IEmptyableCollection
3617- (-empty [coll] (-with-meta (.-EMPTY List) meta))
3617+ (-empty [coll]
3618+ ; ; MAYBE FIXME: :lite-mode testing uncovered a very old bug, empty on seq
3619+ ; ; should discared the metadata, we change the behavior in LITE_MODE for now
3620+ ; ; to avoid a breaking change
3621+ (if-not ^boolean LITE_MODE
3622+ (-with-meta (.-EMPTY List) meta)
3623+ (.-EMPTY List)))
36183624
36193625 ISequential
36203626 IEquiv
@@ -6528,7 +6534,7 @@ reduces them without incurring seq initialization"
65286534 ICounted
65296535 (-count [coll] count))
65306536
6531- (set! (.-EMPTY PersistentQueue) (PersistentQueue. nil 0 nil [] empty-ordered-hash))
6537+ (set! (.-EMPTY PersistentQueue) (PersistentQueue. nil 0 nil ( .-EMPTY PersistentVector) empty-ordered-hash))
65326538
65336539(es6-iterable PersistentQueue)
65346540
Original file line number Diff line number Diff line change 4040 (testing " lazy seq"
4141 (is (seq? e-lazy-seq))
4242 (is (empty? e-lazy-seq))
43- (is (= {:b :c } (meta e-lazy-seq)))))
43+ ; ; MAYBE FIXME: this is a bad test, discovered from :lite-mode work
44+ (if-not ^boolean LITE_MODE
45+ (is (= {:b :c } (meta e-lazy-seq)))
46+ ; ; LITE_MODE has the correct behavior
47+ (is (nil? (meta e-lazy-seq))))))
4448 (let [e-list (empty '^{:b :c } (1 2 3 ))]
4549 (testing " list"
4650 (is (seq? e-list))
Original file line number Diff line number Diff line change 4848 [cljs.clojure-alias-test]
4949 ; ; [cljs.hash-map-test]
5050 ; ; [cljs.map-entry-test]
51- ; ; [cljs.metadata-test]
51+ [cljs.metadata-test]
5252 [cljs.npm-deps-test]
5353 [cljs.other-functions-test]
5454 [cljs.predicates-test]
107107 'cljs.specials-test
108108 'cljs.spec.test-test
109109 'cljs.clojure-alias-test
110- #_ 'cljs.metadata-test ; ; another RSeq one
110+ 'cljs.metadata-test
111111 'cljs.npm-deps-test
112112 'cljs.other-functions-test
113113 'cljs.predicates-test
You can’t perform that action at this time.
0 commit comments