For the reasons outlined in this comment, i suggest to annotate the modes and reset maps, and while we are at it, use concrete types inside:
struct HybridSystem{A, ST<:AbstractSystem, VM<:AbstractVector{ST}, MT<:AbstractMap, VR<:AbstractVector{MT}, W, VW<:AbstractVector{W}} <: AbstractHybridSystem
automaton::A
modes::VM
resetmaps::VR
switchings::VW
# Can be used by extensions
ext::Dict{Symbol, Any}
end
For the reasons outlined in this comment, i suggest to annotate the modes and reset maps, and while we are at it, use concrete types inside: