Skip to content
Browse files

CLJS-669: fix resolution of namespaced keywords that use :require-mac…

…ros aliases
  • Loading branch information...
1 parent 7a912f3 commit 7632693eb0c5deddbb88267202dde98c486ed48d @cemerick cemerick committed with swannodette Nov 9, 2013
Showing with 6 additions and 4 deletions.
  1. +1 −1 src/clj/cljs/analyzer.clj
  2. +1 −1 src/clj/cljs/compiler.clj
  3. +4 −2 test/cljs/cljs/keyword_test.cljs
View
2 src/clj/cljs/analyzer.clj
@@ -1252,7 +1252,7 @@ argument, which the reader will use in any emitted errors."
form (binding [*ns* (create-ns *cljs-ns*)
reader/*alias-map*
(apply merge
- ((juxt :requires :requires-macros)
+ ((juxt :requires :require-macros)
(get-namespace *cljs-ns*)))]
(reader/read rdr nil eof-sentinel))]
(if (identical? form eof-sentinel)
View
2 src/clj/cljs/compiler.clj
@@ -756,7 +756,7 @@
(emit-wrap env (emits target " = " val)))
(defmethod emit* :ns
- [{:keys [name requires uses requires-macros env]}]
+ [{:keys [name requires uses require-macros env]}]
(emitln "goog.provide('" (munge name) "');")
(when-not (= name 'cljs.core)
(emitln "goog.require('cljs.core');"))
View
6 test/cljs/cljs/keyword_test.cljs
@@ -1,6 +1,8 @@
(ns cljs.keyword-test
- (:require [cljs.keyword-other :as other]))
+ (:require [cljs.keyword-other :as other])
+ (:require-macros [clojure.core :as cc]))
(defn test-keyword []
(assert (= ::bar :cljs.keyword-test/bar))
- (assert (= ::other/foo :cljs.keyword-other/foo)))
+ (assert (= ::other/foo :cljs.keyword-other/foo))
+ (assert (= ::cc/foo :clojure.core/foo)))

0 comments on commit 7632693

Please sign in to comment.
Something went wrong with that request. Please try again.