<< Back to previous view

[CTYP-282] Internal error with t/defn, sort-by and no refer all Created: 24/Oct/15  Updated: 26/Oct/18

Status: Reopened
Project: core.typed
Component/s: None
Affects Version/s: None
Fix Version/s: Backlog

Type: Defect Priority: Major
Reporter: Vince Broz Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Environment:

org.clojure/core.typed 0.3.12



 Description   

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.



 Comments   
Comment by Vince Broz [ 03/Dec/17 8:06 PM ]

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.

Comment by Ambrose Bonnaire-Sergeant [ 03/Dec/17 9:11 PM ]

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.

Generated at Sun May 19 09:39:33 CDT 2019 using JIRA 4.4#649-r158309.