Can i declare struct with one type or enother using ||

can i make something like this

struct mystruct{T} where T <: Int || tuple{Int,Int}
    a::T
end

T <: Union{Int, Tuple{Int, Int}} perhaps.

2 Likes

Thank you so much!

Full code looks like:

struct MyType{T <: Union{Int, Tuple{Int, Int}}} <: AbstractMyType
    param::T
end