Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve precision of nfields_tfunc on
Union
(JuliaLang#37497)
`nfields_tfunc(Tuple{Int, Union{Int, Float64}})` gave `Const(2)`, but `nfields_tfunc(Union{Tuple{Int, Float64}, Tuple{Int, Int}})` gave `Int`. In general, it's not great for the tfuncs to give different answers when given `==` types, because other parts of the system will happily substitute such types without changes to the user code, which can change the inference result and lead to instability.
- Loading branch information