|
(ns minimalcase |
|
(:require [ clojure.core.typed :as typed ])) |
|
|
|
|
|
;; both forms provoke a "method too large" crash at type checking |
|
|
|
;; --- case 1 (140 functions in macro generated protocol) |
|
|
|
(defmacro build-minimal-case [i] |
|
(concat `(typed/defprotocol PP) |
|
(reduce |
|
(fn [acc i] |
|
(let [f (symbol (str "ff" i))] |
|
(cons `(~f [this#] :- typed/Any) acc))) |
|
'() (range i)))) |
|
|
|
#_(build-minimal-case 140) |
|
|
|
;; --- case 2 (39 functions in protocol) |
|
|
|
(typed/defprotocol P |
|
(f00 [this] :- typed/Any) |
|
(f01 [this] :- typed/Any) |
|
(f02 [this] :- typed/Any) |
|
(f03 [this] :- typed/Any) |
|
(f04 [this] :- typed/Any) |
|
(f05 [this] :- typed/Any) |
|
(f06 [this] :- typed/Any) |
|
(f07 [this] :- typed/Any) |
|
(f08 [this] :- typed/Any) |
|
(f09 [this] :- typed/Any) |
|
(f10 [this] :- typed/Any) |
|
(f11 [this] :- typed/Any) |
|
(f12 [this] :- typed/Any) |
|
(f13 [this] :- typed/Any) |
|
(f14 [this] :- typed/Any) |
|
(f15 [this] :- typed/Any) |
|
(f16 [this] :- typed/Any) |
|
(f17 [this] :- typed/Any) |
|
(f18 [this] :- typed/Any) |
|
(f19 [this] :- typed/Any) |
|
(f20 [this] :- typed/Any) |
|
(f21 [this] :- typed/Any) |
|
(f22 [this] :- typed/Any) |
|
(f23 [this] :- typed/Any) |
|
(f24 [this] :- typed/Any) |
|
(f25 [this] :- typed/Any) |
|
(f26 [this] :- typed/Any) |
|
(f27 [this] :- typed/Any) |
|
(f28 [this] :- typed/Any) |
|
(f29 [this] :- typed/Any) |
|
(f30 [this] :- typed/Any) |
|
(f31 [this] :- typed/Any) |
|
(f32 [this] :- typed/Any) |
|
(f33 [this] :- typed/Any) |
|
(f34 [this] :- typed/Any) |
|
(f35 [this] :- typed/Any) |
|
(f36 [this] :- typed/Any) |
|
(f37 [this] :- typed/Any) |
|
(f38 [this] :- typed/Any)) |