Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Added test that #^dynamic is propogated to dynamically declared vars #11

Closed
wants to merge 1 commit into from

1 participant

@slagyr

Test to verify behavior added in the following commit:

535907e

@Tirael90 Tirael90 referenced this pull request in clojure-android/clojure
Closed

Android 5.0 - L #3

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 12 additions and 1 deletion.
  1. +12 −1 test/clojure/test_clojure/def.clj
View
13 test/clojure/test_clojure/def.clj
@@ -19,10 +19,21 @@
;; 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
+ (eval
'(do
(defmacro my-macro [] :a)
(defn do-macro [] (my-macro))
(defmacro my-macro [] :b)
(defn do-macro [] (my-macro))
(do-macro)))))))
+
+(deftest nested-dynamic-declaration
+ (testing "vars :dynamic meta data is applied immediately to vars declared anywhere"
+ (is (= 10
+ (eval
+ '(do
+ (list
+ (declare ^:dynamic p)
+ (defn q [] @p))
+ (binding [p (atom 10)]
+ (q))))))))
Something went wrong with that request. Please try again.