以下代码(意外地)通过了一个类型的检查。
`
(ns tst
(:require
[clojure.core.typed :refer [Int Kw ann] :as typed]))
(typed/defprotocol [[a :variance :covariant]] P
(f [p :- (P a)] :- a))
(typed/ann-record [[a :variance :covariant]] R [_f :- a])
(defrecord R [_f]
P
(f [self] _f))
(ann fr [(R Int) -> Kw])
(defn fr [x] (f x))
`