Permalink
Browse files

fix create-var

  • Loading branch information...
Bronsa committed Feb 28, 2014
1 parent d5758cf commit 7aa1fe8c1c43cd1253485a5d013e088028017c3a
Showing with 3 additions and 5 deletions.
  1. +3 −5 src/eastwood/analyze_ns.clj
@@ -152,12 +152,10 @@
(defn create-var
[sym {:keys [ns]}]
- (if-let [v (find-var (symbol (str ns) (name sym)))]
+ (let [v (or (find-var (symbol (str ns) (name sym)))
+ (intern ns (with-meta sym {})))]
(doto v
- (reset-meta! (if (bound? v)
- (merge (meta sym) (meta v))
- (meta sym))))
- (intern ns sym)))
+ (reset-meta! (or (meta sym) {})))))
;; run-passes is a cut-down version of run-passes in
;; tools.analyzer.jvm. It eliminates phases that are not needed for

0 comments on commit 7aa1fe8

Please sign in to comment.