Calling zpk([], [1], 1) will call the SisoZpk constuctor twice and calling tf([1], [1]) will call the SisoRational constructor three times.
@mfalt found that it was a conversion call that was the villain and it could be fixedfor zpk by changing struct SisoZpk{T,TR<:Number} <: SisoTf{T} to struct SisoZpk{T<:Number,TR<:Number} <: SisoTf{T} in SisoZpk.jl and adding Base.convert(::Type{T}, x::T) where {T<:SisoZpk} = x in conversion.jl
Calling
zpk([], [1], 1)
will call theSisoZpk
constuctor twice and callingtf([1], [1])
will call theSisoRational
constructor three times.@mfalt found that it was a conversion call that was the villain and it could be fixedfor
zpk
by changingstruct SisoZpk{T,TR<:Number} <: SisoTf{T}
tostruct SisoZpk{T<:Number,TR<:Number} <: SisoTf{T}
in SisoZpk.jl and addingBase.convert(::Type{T}, x::T) where {T<:SisoZpk} = x
in conversion.jl