core.typed

Type checking fails using core.typed's defn but succeeds without

Details

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

Description

Something seems to be wrong when using core.typed's defn with count:

; this fails type checking
(t/defn f [c :- clojure.lang.Counted] :- t/Int (count c))
 
; but this passes
(t/ann f [clojure.lang.Counted -> t/Int])
(defn f [c] (count c))

The error I get is:

Exception in thread "main" java.lang.IllegalArgumentException: No method in multimethod 'fold-rhs' for dispatch value: [:clojure.core.typed.subst/substitute clojure.core.typed.path_rep.CountPE]

I've posted the whole stack trace here: https://gist.github.com/t6/af21a4f4c6195cd27743

Activity

There are no comments yet on this issue.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated: