Which begs the question, why not? To answer this question myself (or at least trying to, after reading a bit more about 15276): it seems that the Julia compiler has to decide whether or not to box s before type inference is run, thus if s is assigned it must defensively assume that it may also change type and hence it must be boxed.
2 Likes