Skip to content

Commit

Permalink
Wrote regression for CLJ-671.
Browse files Browse the repository at this point in the history
Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>
  • Loading branch information
fogus authored and stuarthalloway committed May 27, 2011
1 parent 2950679 commit 7b9dbdb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/clojure/test_clojure/compilation.clj
Expand Up @@ -80,3 +80,11 @@
(is (= "(int, long)" (TestDispatch/someMethod (int 1) (long 1))))
(is (= "(long, long)" (TestDispatch/someMethod (long 1) (long 1)))))

(deftest test-CLJ-671-regression
(testing "that the presence of hints does not cause the compiler to infinitely loop"
(letfn [(gcd [x y]
(loop [x (long x) y (long y)]
(if (== y 0)
x
(recur y ^Long(rem x y)))))]
(is (= 4 (gcd 8 100))))))

0 comments on commit 7b9dbdb

Please sign in to comment.