Skip to content

Commit

Permalink
Add test for CTYP-80
Browse files Browse the repository at this point in the history
CTYP-80 seems like ancient history, but this test is referenced in the issue
and I didn't find it in the current test suite. For completeness, I added it,
even though I can't remember the actual issue.
  • Loading branch information
frenchy64 committed Jul 20, 2015
1 parent 2a97f5a commit e21ece3
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions module-check/src/test/clojure/clojure/core/typed/test/core.clj
Expand Up @@ -4961,6 +4961,22 @@
(zero? 0))
true)))

;; unclear what this is testing, but it's been fixed sometime after 0.2.11
(deftest CTYP-80-test
(is-tc-e (do (defalias SLiteral (U Sym (Option (Seqable SLiteral))))

(ann s-check (Pred Symbol))
(defn s-check
[x]
(symbol? x))

(ann s-test [SLiteral -> SLiteral])
(defn s-test
[sliteral]
(if (s-check sliteral)
'win
(second sliteral))))))

; (is-tc-e
; (let [f (fn [{:keys [a] :as m} :- '{:a (U nil Num)}] :- '{:a Num}
; {:pre [(number? a)]}
Expand Down

0 comments on commit e21ece3

Please sign in to comment.