You could validate in an inner constructor:
struct BustedType2{B,S}
function BustedType2{B,S}() where {B,S}
(isa(B,Bool) && isa(S,Integer)) || error("bad params")
new()
end
end
You could validate in an inner constructor:
struct BustedType2{B,S}
function BustedType2{B,S}() where {B,S}
(isa(B,Bool) && isa(S,Integer)) || error("bad params")
new()
end
end