Description
In julia 1.6, typeof(length(SparseArray))
always returned an Int64.
But in julia 1.7, after #39645 it returned the same type as the index type.
Now in julia 1.8rc1, the type is again always an Int64.
The regression was introduced by #41510, since length(array) is calculated through prod.
On the other hand, I understand that the promotion may be necessary for n-dimensional arrays, since the length may overflow the type of the individual dimensions. So, if we want to stick to Int64, maybe we could document it in the julia 1.8 release notes?
thanks