I find the error message here unclear, it seems to me that the zeros
for this new type is clearly defined. What is going on here? Is there any reason not to define new methods to zeros
explicitly?
julia> struct A
n::Int
x::Vector{Float64}
end
julia> Base.zeros(::A, n) = A(0, zeros(n))
julia> zeros(A, 3)
ERROR: MethodError: no method matching zero(::Type{A})