From 1ce0ca772d03004de9c42b1030a8564a9f78888a Mon Sep 17 00:00:00 2001 From: davidnolen Date: Wed, 20 Nov 2024 06:21:46 -0800 Subject: [PATCH] * test-var --- src/test/clojure/cljs/analyzer/spec_tests.clj | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/test/clojure/cljs/analyzer/spec_tests.clj b/src/test/clojure/cljs/analyzer/spec_tests.clj index b59c5022f..4ea5f8d91 100644 --- a/src/test/clojure/cljs/analyzer/spec_tests.clj +++ b/src/test/clojure/cljs/analyzer/spec_tests.clj @@ -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]))]