That’s precisely the rub. Not only could inference be disabled, but collecting things like:
f() = rand() > 1 ? 1 : 1.0
[f() for _ in 1:3]
used to return an Vector{Any} (a long long time ago). We’ve made inference better, so now it’d be a Vector{Union{...}} if we still relied on inference, but that’s precisely the problem — ideally inference improvements wouldn’t change behaviors. At the end of the day, it’s an optimization.