Skip to content

Commit 7bf09f0

Browse files
committed
* :no-op only has :env & :op
* test-no-op
1 parent 867a26b commit 7bf09f0

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/test/clojure/cljs/analyzer/spec_tests.clj

+5-1
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,11 @@
208208
(is (s/valid? ::a/node (no-warn (analyze ns-env '(String.)))))
209209
(is (s/valid? ::a/node (analyze ns-env '(js/String.)))))
210210

211-
;; no-op
211+
(deftest test-no-op
212+
(let [node (binding [ana/*unchecked-if* true]
213+
(no-warn (analyze ns-env '(set! *unchecked-if* false))))]
214+
(is (= :no-op (:op node)))
215+
(is (s/valid? ::a/node node))))
212216

213217
(deftest test-ns
214218
(let [node (no-warn

src/test/clojure/cljs/analyzer/specs.cljc

+2-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,8 @@
220220
:req-un [::class ::args])))
221221

222222
(defmethod node :no-op [_]
223-
::base)
223+
(s/keys
224+
:req-un [::env ::op]))
224225

225226
(defmethod node :ns [_]
226227
::base)

0 commit comments

Comments
 (0)