Hi all.
Should `(map identity (java.util.HashMap.)` type check?
----------
user=> (do (require '[clojure.core.typed :as t]) (t/cf (map identity (java.util.HashMap.))))
Type Error (/tmp/form-init3280987779190725166.clj:1:49) Polymorphic function map could not be applied to arguments:
Polymorphic Variables:
c
a
b
Domains:
[a b ... b -> c] (t/NonEmptySeqable a) (t/NonEmptySeqable b) ... b
[a b ... b -> c] (t/U (Seqable a) nil) (t/U (Seqable b) nil) ... b
Arguments:
(t/All [x] [x -> x :filters {:then (! (t/U nil false) 0), :else (is (t/U nil false) 0)} :object {:id 0}]) java.util.HashMap
Ranges:
(t/NonEmptyASeq c)
(t/ASeq c)
in: (map identity (new java.util.HashMap))
ExceptionInfo Type Checker: Found 1 error clojure.core/ex-info (core.clj:4403)
----------
I also tried `(map identity (into {} (java.util.HashMap.))`, but `into` fails in a similar way (wants a Seqable, which java.util.Map isn't).
Thanks!
Mark