Push! not working as expected

What am I doing wrong here:

using KiteUtils
s=demo_state(7)
vec=Vector{SysState{7}}[]
typeof(s)

Output

SysState{7}

Now I try to push s into the vector vec

julia> push!(vec,s)
ERROR: MethodError: Cannot `convert` an object of type SysState{7} to an object of type Vector{SysState{7}}
Closest candidates are:
  convert(::Type{T}, ::LinearAlgebra.Factorization) where T<:AbstractArray at ~/packages/julias/julia-1.7/share/julia/stdlib/v1.7/LinearAlgebra/src/factorization.jl:58
  convert(::Type{Array{T, N}}, ::FillArrays.Zeros{V, N}) where {T, V, N} at ~/.julia/packages/FillArrays/5Arin/src/FillArrays.jl:440
  convert(::Type{Array{T, N}}, ::FillArrays.Ones{V, N}) where {T, V, N} at ~/.julia/packages/FillArrays/5Arin/src/FillArrays.jl:440
  ...
Stacktrace:
 [1] push!(a::Vector{Vector{SysState{7}}}, item::SysState{7})
   @ Base ./array.jl:994
 [2] top-level scope
   @ REPL[7]:1

Any idea why this doesn’t work?

Vector{SysState{7}}[] constructs a vector of vectors:

julia> typeof(vec)
Vector{Vector{SysState{7}}}

You’ll need to write that as SysState{7}[] or Vector{SysState{7}}() instead.

vec=SysState{7}[]
push!(vec, s)

Works…

Sorry for the noise…