Uploaded image for project: 'core.typed'
  1. CTYP-282

Internal error with t/defn, sort-by and no refer all

    Details

    • Type: Bug
    • Status: Reopened
    • Priority: Major
    • Resolution: Unresolved
    • Affects versions: None
    • Fix versions: Backlog
    • Components: None
    • 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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              alex+import import
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: