Consider this simplified example (possibility not quite minimal…)
test1(x::AbstractVector{TI}, y) where {TI <: Integer} = max.(floor.(TI, x /y), one(TI))
then note the Any
in the type signature of the output:
julia> test1((@SVector [1,2,3]), rand())
3-element SArray{Tuple{3},Any,1,3}:
1
3
5
This did not happen on v0.6.x. EDIT: The same bug is also present in 0.6.4. It also does not happen if I call test1([1,2,3], rand())
. It also does not happen for the following variant:
function test2(x::AbstractVector{TI}, y) where {TI <: Integer}
t = floor.(TI, x /y)
max.(t, one(TI))
end
julia> test2((@SVector [1,2,3]), rand())
3-element SArray{Tuple{3},Int64,1,3}:
2
5
8
Probably a bug? But where to file the issue?
EDIT: the behaviour on 0.7 is the same.