You mean like this?
struct SomeFoo{T<:Integer} <: AbstractFoo{T}
field1::T
field2::Vector{T}
end
julia> SomeFoo(1, [1, 2])
SomeFoo{Int64}(1, [1, 2])
I should also ask why you need the limitation at all? This would stop people using integers or floats with Unitful units, or similar things…