Overloading zeros

It should be

Base.zeros(::Type{A}, n) = A(0, zeros(n))

The former expects an instance of A and the latter expects the type.

4 Likes