File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 13651365 [& impls]
13661366 (core/let [t (with-meta
13671367 (gensym
1368- (core/str " t_ "
1368+ (core/str " t_reify_ "
13691369 (string/replace (core/str (munge ana/*cljs-ns*)) " ." " $" )))
13701370 {:anonymous true })
13711371 meta-sym (gensym " meta" )
13821382 IMeta
13831383 (~'-meta [~this-sym] ~meta-sym)
13841384 ~@impls ))
1385- (new ~t ~@locals ~(ana/elide-reader-meta (meta &form))))))
1385+ (new ~t ~@locals
1386+ ; ; if the form meta is empty, emit nil
1387+ ~(let [form-meta (ana/elide-reader-meta (meta &form))]
1388+ (when-not (empty? form-meta)
1389+ form-meta))))))
13861390
13871391(core/defmacro specify!
13881392 " Identical to reify but mutates its first argument."
17991803 (deftype* ~t ~fields ~pmasks
18001804 ~(if (seq impls)
18011805 `(extend-type ~t ~@(dt->et t impls fields))))
1802- (set! (.-getBasis ~t) (fn [] '[~@fields]))
1806+ ; ; don't emit static basis method w/ reify
1807+ ~@(when-not (.startsWith (name t) " t_reify" )
1808+ [`(set! (.-getBasis ~t) (fn [] '[~@fields]))])
18031809 (set! (.-cljs$lang$type ~t) true )
18041810 (set! (.-cljs$lang$ctorStr ~t) ~(core/str r))
18051811 (set! (.-cljs$lang$ctorPrWriter ~t) (fn [this# writer# opt#] (-write writer# ~(core/str r))))
You can’t perform that action at this time.
0 commit comments