Skip to content

Commit

Permalink
* test-var
Browse files Browse the repository at this point in the history
  • Loading branch information
swannodette committed Nov 20, 2024
1 parent a91025a commit 1ce0ca7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/test/clojure/cljs/analyzer/spec_tests.clj
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,13 @@
(is (= :try (:op node)))
(is (s/valid? ::a/node node))))

;; var
(deftest test-var
(let [node (no-warn (analyze ns-env '(fn [] x)))
fn-method (-> node :methods first)
body (-> fn-method :body)
ret (:ret body)]
(is (= :var (:op ret)))
(is (s/valid? ::a/node node))))

(deftest test-vector
(let [node (no-warn (analyze ns-env '[1 2]))]
Expand Down

0 comments on commit 1ce0ca7

Please sign in to comment.