Skip to content

Commit 31ae4dd

Browse files
author
dnolen
committed
more informative error for cljs.analyzer/foreign-dep?
1 parent dea4141 commit 31ae4dd

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/main/clojure/cljs/analyzer.cljc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2074,7 +2074,8 @@
20742074
(defn foreign-dep?
20752075
#?(:cljs {:tag boolean})
20762076
[dep]
2077-
{:pre [(symbol? dep)]}
2077+
(assert (symbol? dep)
2078+
(str "cljs.analyzer/foreign-dep? expected symbol got " dep))
20782079
(let [js-index (:js-dependency-index @env/*compiler*)]
20792080
(if-some [[_ {:keys [foreign]}] (find js-index (name dep))]
20802081
foreign

0 commit comments

Comments
 (0)