richhickey/clojure-clr

Premature casting: We cast local variables to tagged types too early.

Closed this issue · 2 comments

ClojureJVM has no problem with this:

(defn f [#^String x] x)
(f 12) => 12

At present, ClojureCLR will complain about not being able to case 12 to a String. This is due to local variables being typed in the DLR expressions. This affects other binding forms such as 'let'.

Actually, it doesn't affect 'let'.

Removed over-agressive typing of IFn parameters. Closed by 4836312