File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -9645,6 +9645,9 @@ Maps become Objects. Arbitrary keys are encoded to by key->js."
9645
9645
9646
9646
9647
9647
(deftype TaggedLiteral [tag form]
9648
+ Object
9649
+ (toString [coll]
9650
+ (pr-str* coll))
9648
9651
9649
9652
IEquiv
9650
9653
(-equiv [this other]
@@ -9666,7 +9669,10 @@ Maps become Objects. Arbitrary keys are encoded to by key->js."
9666
9669
:form form
9667
9670
not-found))
9668
9671
9669
- )
9672
+ IPrintWithWriter
9673
+ (-pr-writer [o writer opts]
9674
+ (-write writer (str " #" tag " " ))
9675
+ (pr-writer form writer opts)))
9670
9676
9671
9677
(defn tagged-literal?
9672
9678
" Return true if the value is the data representation of a tagged literal"
Original file line number Diff line number Diff line change 2812
2812
(is (= tl (tagged-literal 'x " y" )))
2813
2813
(is (not= tl (tagged-literal 'z " y" )))
2814
2814
(is (not= tl (tagged-literal 'x " z" )))
2815
- (is (= (hash tl) (hash (tagged-literal 'x " y" ))))))
2815
+ (is (= (hash tl) (hash (tagged-literal 'x " y" ))))
2816
+ (is (= " #foo [1]" (str (tagged-literal 'foo [1 ]))))))
2816
2817
2817
2818
(defn- incme []
2818
2819
(let [incme (fn [a queue & args] (inc a))]
You can’t perform that action at this time.
0 commit comments