diff --git a/src/test/clojure/cljs/analyzer/spec_tests.clj b/src/test/clojure/cljs/analyzer/spec_tests.clj index c24a1b458..82509afbd 100644 --- a/src/test/clojure/cljs/analyzer/spec_tests.clj +++ b/src/test/clojure/cljs/analyzer/spec_tests.clj @@ -208,7 +208,11 @@ (is (s/valid? ::a/node (no-warn (analyze ns-env '(String.))))) (is (s/valid? ::a/node (analyze ns-env '(js/String.))))) -;; no-op +(deftest test-no-op + (let [node (binding [ana/*unchecked-if* true] + (no-warn (analyze ns-env '(set! *unchecked-if* false))))] + (is (= :no-op (:op node))) + (is (s/valid? ::a/node node)))) (deftest test-ns (let [node (no-warn diff --git a/src/test/clojure/cljs/analyzer/specs.cljc b/src/test/clojure/cljs/analyzer/specs.cljc index 08e94910e..c721a0a3f 100644 --- a/src/test/clojure/cljs/analyzer/specs.cljc +++ b/src/test/clojure/cljs/analyzer/specs.cljc @@ -220,7 +220,8 @@ :req-un [::class ::args]))) (defmethod node :no-op [_] - ::base) + (s/keys + :req-un [::env ::op])) (defmethod node :ns [_] ::base)