Type :long loop-carried vars too (complete round 2)

loop-kinds only typed :double accumulators; a ^long-seeded loop var (e.g.
(loop [acc start] ...) with a ^long start) stayed generic even though it's sound
to fx-type — :long only ever comes from an explicit hint, and a ^long value is
already coerced to a fixnum at fn entry. Keep the init's kind (:double or :long)
through the fixpoint, demoting only on a recur-arg mismatch.

Integer-literal-init loop vars (a bare (loop [i 0] ...)) still stay generic by
design: :long is never seeded from a literal, so a bignum-producing loop keeps
arbitrary precision.
This commit is contained in:
Yogthos 2026-06-23 17:04:44 -04:00
parent eab18e363c
commit 7d1b9e56d8
3 changed files with 166 additions and 159 deletions

File diff suppressed because one or more lines are too long