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"
3614
3614
(-conj [coll o] (cons o coll))
3615
3615
3616
3616
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)))
3618
3624
3619
3625
ISequential
3620
3626
IEquiv
@@ -6528,7 +6534,7 @@ reduces them without incurring seq initialization"
6528
6534
ICounted
6529
6535
(-count [coll] count))
6530
6536
6531
- (set! (.-EMPTY PersistentQueue) (PersistentQueue. nil 0 nil [] empty-ordered-hash))
6537
+ (set! (.-EMPTY PersistentQueue) (PersistentQueue. nil 0 nil ( .-EMPTY PersistentVector) empty-ordered-hash))
6532
6538
6533
6539
(es6-iterable PersistentQueue)
6534
6540
Original file line number Diff line number Diff line change 40
40
(testing " lazy seq"
41
41
(is (seq? e-lazy-seq))
42
42
(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))))))
44
48
(let [e-list (empty '^{:b :c } (1 2 3 ))]
45
49
(testing " list"
46
50
(is (seq? e-list))
Original file line number Diff line number Diff line change 48
48
[cljs.clojure-alias-test]
49
49
; ; [cljs.hash-map-test]
50
50
; ; [cljs.map-entry-test]
51
- ; ; [cljs.metadata-test]
51
+ [cljs.metadata-test]
52
52
[cljs.npm-deps-test]
53
53
[cljs.other-functions-test]
54
54
[cljs.predicates-test]
107
107
'cljs.specials-test
108
108
'cljs.spec.test-test
109
109
'cljs.clojure-alias-test
110
- #_ 'cljs.metadata-test ; ; another RSeq one
110
+ 'cljs.metadata-test
111
111
'cljs.npm-deps-test
112
112
'cljs.other-functions-test
113
113
'cljs.predicates-test
You can’t perform that action at this time.
0 commit comments