core.typed

Apply doesn't work with dotted arguments

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

This code:

(t/ann foo (All [x y ...] [[y ... y -> x] -> [y ... y -> x]]))
(defn foo
  "Doesn't do anything useful."
  [f]
  (let [mem (memoize (fn [& args] #(apply f args)))]
    (fn [& args]
      ((apply mem args)))))

On type-check throws this exception:

AssertionError Assert failed: (not (some :drest (:types fin)))  clojure.core.typed.check/relevant-Fns (check.clj:2661)

I'm using core.typed version 0.2.36.

Activity

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: