<< Back to previous view

[CTYP-116] Apply doesn't work with dotted arguments Created: 11/Mar/14  Updated: 18/Apr/14

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

Type: Defect Priority: Major
Reporter: Gary Fredericks Assignee: Ambrose Bonnaire-Sergeant
Resolution: Unresolved Votes: 0
Labels: None

Attachments: File apply.diff    


This code:

(t/ann foo (All [x y ...] [[y ... y -> x] -> [y ... y -> x]]))
(defn foo
  "Doesn't do anything useful."
  (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.

Comment by Ambrose Bonnaire-Sergeant [ 11/Mar/14 10:31 PM ]

I suspect minimal case is:

(cf (fn [f & args] (apply f args)) (All [b ...] [[b ... b -> Any] b ... b -> Any]))
Comment by Gary Fredericks [ 11/Mar/14 10:35 PM ]

Indeed I get the same error with that snippet.

Comment by Di Xu [ 18/Apr/14 9:25 PM ]

seems solved this problem

Generated at Thu Apr 24 08:17:35 CDT 2014 using JIRA 4.4#649-r158309.