Welcome! Please see the About page for a little more info on how this works.

0 votes
in ClojureScript by
If CLJC is being used and the ClojureScript compiler sees Clojure type annotations, it should effecively ignore those where there isn't a portability concern.

The specific case for this ticket is {{^int}} and arithmetic, and a motivating example is:


cljs.user=> (let [^int v (alength (into-array []))] (+ v 3))
WARNING: cljs.core/+, all arguments must be numbers, got [int number] instead. at line 1 <cljs repl>
3


On the other hand, {{^long}} should still cause warnings to be emitted given that it is not a "subtype" of {{^number}} (such code might overflow, so warnings are helpful in that case).

1 Answer

0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJS-2435 (reported by mfikes)
...