Skip to content

Commit

Permalink
CLJS-334: produce sane error message when ctor arg to new is not a sy…
Browse files Browse the repository at this point in the history
…mbol
  • Loading branch information
michalmarczyk authored and David Nolen committed Aug 30, 2012
1 parent 6b44ea9 commit dae155a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/clj/cljs/analyzer.clj
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,7 @@

(defmethod parse 'new
[_ env [_ ctor & args :as form] _]
(assert (symbol? ctor) "First arg to new must be a symbol")
(disallowing-recur
(let [enve (assoc env :context :expr)
ctorexpr (analyze enve ctor)
Expand Down

0 comments on commit dae155a

Please sign in to comment.