Welcome! Please see the About page for a little more info on how this works.

0 votes
in core.typed by
How to reproduce:


(require 'clojure.core.typed)
(clojure.core.typed/cf (clojure.core.typed/defn foo [] sort-by))


It does seem to reproduce somewhat flakily within existing REPL environments depending on what you've run in the past.  This will consistently reproduce it:


docker run -i -t clojure bash
echo '{:user {:plugins [[lein-try "0.4.3"]]}}' > ~/.lein/profiles.clj
lein try org.clojure/core.typed

(require 'clojure.core.typed) ;; does not work with refer all
(clojure.core.typed/cf (clojure.core.typed/defn foo [] sort-by))


Observed result:


Initializing core.typed ...
Building core.typed base environments ...
Finished building base environments
"Elapsed time: 5836.201655 msecs"
core.typed initialized.
DEPRECATED SYNTAX (/tmp/form-init6540853594514266546.clj:1:24): All syntax is deprecated, use clojure.core.typed/All
Type Error (/tmp/form-init6540853594514266546.clj:1:24) Internal Error (/tmp/form-init6540853594514266546.clj:1:24) Cannot resolve type: IFn
Hint: Is IFn in scope?
Hint: Has IFn's annotation been found via check-ns, cf or typed-deps?
Error


Desired result:

Correct type returned.

3 Answers

0 votes
by

Comment made by: apiology

Hi! I just reproduced this issue using the docker recipe above (which uses the current version of org.clojure/core.typed. Did you try using the Docker recipe? Suggest reopening.

0 votes
by

Comment made by: ambrosebs

Thanks, I appreciate the followup! I think there's something fishy going on with a subset of the base type environment that's shared between the CLJ and CLJS checkers.

0 votes
by
Reference: https://clojure.atlassian.net/browse/CTYP-282 (reported by alex+import)
...