View difference between Paste ID: hMvGVNKE and pfJPYM2w
SHOW: | | - or go back to the newest paste.
1
(ns typed.test
2-
  (:require [clojure.core.typed :refer [ann check-ns tc-ignore]]))
2+
  (:require [clojure.core.typed :refer [ann check-ns tc-ignore]])
3
  (:import [clojure.lang IPersistentMap])
4
(tc-ignore
5
 (defrecord R [v]))
6
7
(ann nop [(IPersistentMap Any Any) -> (IPersistentMap Any Any)])
8
(defn nop [m] m)
9
10
(ann r R)
11
(def r (R. 1))
12
13
(nop r)
14
15
;; Running (check-ns) on this gives:
16
;; AssertionError Assert failed: 16: Wrong number of arguments passed to polymorphic type:
17
;; (All [a] (clojure.lang.IPersistentCollection a))[]
18
;; (= (:nbound t) (count types))  clojure.core.typed/instantiate-poly (type_rep.clj:477)