Skip to content

Commit 4f9fb9e

Browse files
author
dnolen
committed
validate :protocol meta, it must be a symbol - discard otherwise
1 parent 2682a4a commit 4f9fb9e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/clojure/cljs/analyzer.cljc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1102,6 +1102,9 @@
11021102
:catch catch
11031103
:children [try catch finally]}))
11041104

1105+
(defn valid-proto [x]
1106+
(when (symbol? x) x))
1107+
11051108
(defmethod parse 'def
11061109
[op env form name _]
11071110
(let [pfn (fn
@@ -1112,7 +1115,7 @@
11121115
sym (:sym args)
11131116
sym-meta (meta sym)
11141117
tag (-> sym meta :tag)
1115-
protocol (-> sym meta :protocol)
1118+
protocol (-> sym meta :protocol valid-proto)
11161119
dynamic (-> sym meta :dynamic)
11171120
ns-name (-> env :ns :name)
11181121
locals (:locals env)

0 commit comments

Comments
 (0)