8000
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 e21285a commit 7bfb0bcCopy full SHA for 7bfb0bc
src/clj/clojure/genclass.clj
@@ -107,8 +107,14 @@
107
(clojure.lang.Util/isPosDigit (name x))
108
(-> x name (.charAt 0) int (- (int \0))))]
109
(let [cn (namespace x)
110
- classname (if (some #{\.} cn) cn (str "java.lang." cn))]
111
- (str (String/join "" ^Iterable (repeat dim "[")) "L" classname ";"))
+ ^Class pc (prim->class (symbol cn))
+ classname (cond (some #{\.} cn) cn
112
+ pc (-> pc Type/getType Type/.getDescriptor)
113
+ :default (str "java.lang." cn))
114
+ ^Iterable dim-descr (repeat dim "[")]
115
+ (if pc
116
+ (str (String/join "" dim-descr) classname)
117
+ (str (String/join "" dim-descr) "L" classname ";")))
118
(str x)))
119
120
(defn- ^Class the-class [x]
0 commit comments