Browse files

CLJ-852: add regression test

Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>
  • Loading branch information...
1 parent af81bca commit 38e21338a9d8ec334b5307bcd3c7b3e27e656d71 @bpsm bpsm committed with stuarthalloway Oct 15, 2011
Showing with 11 additions and 1 deletion.
  1. +11 −1 test/clojure/test_clojure/metadata.clj
View
12 test/clojure/test_clojure/metadata.clj
@@ -74,4 +74,14 @@
(def quux 1))
(def-quux)
#'quux)]
- (is (nil? (-> v meta :e)))))))
+ (is (nil? (-> v meta :e))))))
+ (testing "IllegalArgumentException should not be thrown"
+ (testing "when defining var whose value is calculated with a primitive fn."
+ (testing "This case fails without a fix for CLJ-852"
+ (is (eval-in-temp-ns
+ (defn foo ^long [^long x] x)
+ (def x (inc (foo 10))))))
+ (testing "This case should pass even without a fix for CLJ-852"
+ (is (eval-in-temp-ns
+ (defn foo ^long [^long x] x)
+ (def x (foo (inc 10)))))))))

0 comments on commit 38e2133

Please sign in to comment.