We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9158e59 commit d79eda3Copy full SHA for d79eda3
1 file changed
src/main/clojure/cljs/analyzer.cljc
@@ -1600,14 +1600,17 @@
1600
(get-in env [:locals sym]))
1601
[sym tag])))))))
1602
1603
+(declare specials)
1604
+
1605
(defn- type-check-induced-tag
1606
"Look for a type-check-induced tag when the test expression is the use of
1607
instance? on a local, as in (instance? UUID x) or implements? on a local, as
1608
in (implements? ICounted x)."
1609
[env test]
1610
(when (and (list? test)
1611
(== 3 (count test))
- (every? symbol? test))
1612
+ (every? symbol? test)
1613
+ (not (contains? specials (first test))))
1614
(let [analyzed-fn (no-warn (analyze (assoc env :context :expr) (first test)))]
1615
(when (= :var (:op analyzed-fn))
1616
(when ('#{cljs.core/instance? cljs.core/implements?} (:name analyzed-fn))
0 commit comments