Skip to content

Commit

Permalink
relax :import to validate w/ sequential? not vector?
Browse files Browse the repository at this point in the history
  • Loading branch information
swannodette committed Nov 4, 2013
1 parent dbf3138 commit 2bedcd6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/clj/cljs/analyzer.clj
Expand Up @@ -836,11 +836,11 @@
(throw (error env (error-msg spec "Only [lib.ns :only (names)] specs supported in :use / :use-macros"))))
[lib :refer referred])
parse-import-spec (fn parse-import-spec [spec]
(when-not (or (and (vector? spec)
(when-not (or (and (sequential? spec)
(every? symbol? spec))
(and (symbol? spec) (nil? (namespace spec))))
(throw (error env (error-msg spec "Only lib.ns.Ctor or [lib.ns Ctor*] spec supported in :import"))))
(let [import-map (if (vector? spec)
(let [import-map (if (sequential? spec)
(->> (rest spec)
(map #(vector % (symbol (str (first spec) "." %))))
(into {}))
Expand Down

0 comments on commit 2bedcd6

Please sign in to comment.