core.typed

Better error for type mismatch with loop/recur

Details

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

Description

Currently a type error (especially involving locals) that complains about a mismatch to a recur statement could be more descriptive. Perhaps mention where the corresponding loop> is? Should also mention the recur statement.

(loop> [f :- AnyInteger]
(let [n (ann-form 1.2 (U Number nil))]
(recur n)))

Type Error (clojure/math/numeric_tower.clj:89:10) Local binding n530 expected type AnyInteger, but actual type (U Number nil)
in: n530

Activity

There are no entries against this issue.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: