Skip to content

Commit d79eda3

Browse files
committed
CLJS-3163: Skip analyzing specials in type-check-induced-tag
1 parent 9158e59 commit d79eda3

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
@@ -1600,14 +1600,17 @@
16001600
(get-in env [:locals sym]))
16011601
[sym tag])))))))
16021602

1603+
(declare specials)
1604+
16031605
(defn- type-check-induced-tag
16041606
"Look for a type-check-induced tag when the test expression is the use of
16051607
instance? on a local, as in (instance? UUID x) or implements? on a local, as
16061608
in (implements? ICounted x)."
16071609
[env test]
16081610
(when (and (list? test)
16091611
(== 3 (count test))
1610-
(every? symbol? test))
1612+
(every? symbol? test)
1613+
(not (contains? specials (first test))))
16111614
(let [analyzed-fn (no-warn (analyze (assoc env :context :expr) (first test)))]
16121615
(when (= :var (:op analyzed-fn))
16131616
(when ('#{cljs.core/instance? cljs.core/implements?} (:name analyzed-fn))

0 commit comments

Comments
 (0)