Details
Assignee
UnassignedUnassignedReporter
Alex MillerAlex MillerPatch
CodePriority
MinorAffects versions
Details
Details
Assignee
Unassigned
UnassignedReporter
Alex Miller
Alex MillerPatch
Code
Priority
Affects versions
Created November 12, 2014 at 3:04 AM
Updated December 14, 2015 at 11:06 PM
With the new :warn-on-boxed (CLJ-1325), these examples do not report a boxed math warning although they each do boxing:
user=> (defn f1 [^long x] (inc x)) f1 user=> (defn f2 [x] (aget (long-array [1 2]) 0)) f2 user=> (defn f3 [x] (aget (int-array [1 2]) 0)) f3 user=> (defn f4 [^String s] (.indexOf s "a"))
Cause: emitBoxReturn has a hard-coded call to box a prim return value.
Solution: If *unchecked-math* is set to :warn-on-boxed, emit a warning on boxing of primitive numeric return types.
Patch: