Skip to content

Commit

Permalink
* :no-op only has :env & :op
Browse files Browse the repository at this point in the history
* test-no-op
  • Loading branch information
swannodette committed Nov 20, 2024
1 parent 867a26b commit 7bf09f0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/test/clojure/cljs/analyzer/spec_tests.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/test/clojure/cljs/analyzer/specs.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@
:req-un [::class ::args])))

(defmethod node :no-op [_]
::base)
(s/keys
:req-un [::env ::op]))

(defmethod node :ns [_]
::base)
Expand Down

0 comments on commit 7bf09f0

Please sign in to comment.