We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ac5ad8 commit 4a29ce2Copy full SHA for 4a29ce2
src/clj/clojure/core_print.clj
@@ -88,9 +88,13 @@
88
(.write w ")"))
89
90
(defn- print-object [o, ^Writer w]
91
+ (when (instance? clojure.lang.IMeta o)
92
+ (print-meta o w))
93
(.write w "#<")
- (.write w (.getSimpleName (class o)))
- (.write w " ")
94
+ (let [name (.getSimpleName (class o))]
95
+ (when (seq name) ;; anonymous classes have a simple name of ""
96
+ (.write w name)
97
+ (.write w " ")))
98
(.write w (str o))
99
(.write w ">"))
100
0 commit comments