Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Prevent reify from causing undeclared Var warnings

  • Loading branch information...
commit 6b90cb700913160dd4af58c17fbf24eb8e91809f 1 parent 9d696d9
@michalmarczyk michalmarczyk authored David Nolen committed
Showing with 7 additions and 3 deletions.
  1. +1 −0  src/clj/cljs/compiler.clj
  2. +6 −3 src/clj/cljs/core.clj
View
1  src/clj/cljs/compiler.clj
@@ -16,6 +16,7 @@
(declare resolve-var)
(declare confirm-bindings)
+(declare munge)
(require 'cljs.core)
(def js-reserved
View
9 src/clj/cljs/core.clj
@@ -230,10 +230,13 @@
'default "_"})
(defmacro reify [& impls]
- (let [t (gensym "t")
- locals (keys (:locals &env))]
+ (let [t (gensym "t")
+ locals (keys (:locals &env))
+ ns (-> &env :ns :name)
+ munge cljs.compiler/munge
+ ns-t (list 'js* (core/str (munge ns) "." (munge t)))]
`(do
- (when (undefined? ~t)
+ (when (undefined? ~ns-t)
(deftype ~t [~@locals __meta#]
cljs.core.IWithMeta
(~'-with-meta [_# __meta#]
Please sign in to comment.
Something went wrong with that request. Please try again.