summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/clojure/test_clojure/def.clj12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/clojure/test_clojure/def.clj b/test/clojure/test_clojure/def.clj
index 950f2a68..3207ff43 100644
--- a/test/clojure/test_clojure/def.clj
+++ b/test/clojure/test_clojure/def.clj
@@ -14,3 +14,15 @@
(testing "bad arglist forms"
(is (fails-with-cause? IllegalArgumentException '#"Parameter declaration arg1 should be a vector"
(eval-in-temp-ns (defn foo (arg1 arg2)))))))
+
+(deftest dynamic-redefinition
+ ;; too many contextual things for this kind of caching to work...
+ (testing "classes are never cached, even if their bodies are the same"
+ (is (= :b
+ (eval
+ '(do
+ (defmacro my-macro [] :a)
+ (defn do-macro [] (my-macro))
+ (defmacro my-macro [] :b)
+ (defn do-macro [] (my-macro))
+ (do-macro)))))))