Recur around try boxes primitives

Description

Primitive function and recur variables can't pass through a (try) cleanly; they're boxed to Object instead. This causes reflection warnings for fns or loops that use primitive types.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 user=> (set! *warn-on-reflection* true) true user=> (fn [] (loop [t 0] (recur t))) #<user$eval676$fn__677 user$eval676$fn__677@3d80023a> user=> (fn [] (loop [t 0] (recur (try t)))) NO_SOURCE_FILE:1 recur arg for primitive local: t is not matching primitive, had: Object, needed: long Auto-boxing loop arg: t #<user$eval680$fn__681 user$eval680$fn__681@5419323a> user=> (fn [^long x] (recur (try x))) NO_SOURCE_FILE:1 recur arg for primitive local: x is not matching primitive, had: Object, needed: long CompilerException java.lang.IllegalArgumentException: recur arg for primitive local: x is not matching primitive, had: Object, needed: long, compiling:(NO_SOURCE_PATH:1:1)

Environment

None

Status

Assignee

Unassigned

Reporter

Kyle Kingsbury

Approval

None

Patch

None

Affects versions

Release 1.6
Release 1.5

Priority

Minor
Configure