We're updating the issue view to help you get more done. 

annotation fails on recur

Description

The following test case fails on check-ns. The issue seems to be the use of recur. The test case is modelled after clojure.core/<

huhu.clj

1 2 3 4 5 6 7 8 9 10 11 (ns huhu (:require [clojure.core.typed :refer :all])) (ann testcase [Number Number * -> boolean]) (defn testcase ([x] true) ([x y] false) ([x y & more] (if (testcase x y) (if (next more) (recur y (first more) (next more)) (testcase y (first more))) false)))

This is the result of check-ns:

1 2 3 4 5 6 (check-ns) Start collecting huhu Finished collecting huhu Collected 1 namespaces in 26.58 msecs Start checking huhu AssertionError Assert failed: (AnyType? t) clojure.core.typed.type-rep/ret (type_rep.clj:825)

If a recursive call instead of recur would be used it works. This is not a workaround to be applicable in every case.

Environment

Mac OS X, clojure 1.5.1, Oracle JDK 1.7.0_45

Status

Assignee

Ambrose BS

Reporter

import

Labels

None

Approval

None

Patch

None

Priority

Minor