Why does my function show this warning on the type of output DArray?
addprocs(4)
using DistributedArrays
function myfill(v::Int)
D = DArray((nworkers(),), workers()) do I
[v]
end
return D
end
So far so good
julia> myfill(3)
4-element DistributedArrays.DArray{Int64,1,Array{Int64,1}}:
3
3
3
3
as expected. But when I do
@code_warntype myfill(3)
I get
Variables:
#self#
v::Int64
#1::##1#2{Int64}
D::Any
n::Int64
#temp#::Int64
Why is D now inferred as Any (on Julia 0.6.2) ?