Skip to content

Commit a151497

Browse files
dek5mfikes
authored andcommitted
CLJS-2933: Consistent #object printing whitespace
1 parent f97d766 commit a151497

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/main/cljs/cljs/core.cljs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10280,13 +10280,13 @@ reduces them without incurring seq initialization"
1028010280

1028110281
Atom
1028210282
(-pr-writer [a writer opts]
10283-
(-write writer "#object [cljs.core.Atom ")
10283+
(-write writer "#object[cljs.core.Atom ")
1028410284
(pr-writer {:val (.-state a)} writer opts)
1028510285
(-write writer "]"))
1028610286

1028710287
Volatile
1028810288
(-pr-writer [a writer opts]
10289-
(-write writer "#object [cljs.core.Volatile ")
10289+
(-write writer "#object[cljs.core.Volatile ")
1029010290
(pr-writer {:val (.-state a)} writer opts)
1029110291
(-write writer "]"))
1029210292

src/test/cljs/cljs/core_test.cljs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1663,3 +1663,7 @@
16631663
(is (= m4 (merge-with + (sorted m1) (sorted m2) m3)))
16641664
(is (= m4 (merge-with + m1 (sorted m2) m3)))
16651665
(is (= m4 (merge-with + m1 (sorted m2) (sorted m3))))))
1666+
1667+
(deftest test-cljs-2933
1668+
(is (= "#object[cljs.core.Atom {:val 1}]" (pr-str (atom 1))))
1669+
(is (= "#object[cljs.core.Volatile {:val 2}]" (pr-str (volatile! 2)))))

0 commit comments

Comments
 (0)