We're updating the issue view to help you get more done. 

Don't warn if arithmetic operations done on ^int

Description

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:

1 2 3 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).

Environment

None

Status

Assignee

Unassigned

Reporter

Mike Fikes

Labels

Approval

None

Patch

None

Affects versions

1.9.908

Priority

Major