@@ -13,8 +13,9 @@ Static(::Val{N}) where {N} = Static{N}()
1313Base. Val (:: Static{N} ) where {N} = Val {N} ()
1414Base. convert (:: Type{T} , :: Static{N} ) where {T<: Number ,N} = convert (T, N)
1515Base. convert (:: Type{Static{N}} , :: Static{N} ) where {N} = Static {N} ()
16- for S ∈ [:Any , :AbstractIrrational ]# , :(Complex{<:Real})]
17- # let S = :Any
16+ # for S ∈ [:Any, :AbstractIrrational]#, :(Complex{<:Real})]
17+ # let S = :Any
18+ let S = :AbstractIrrational
1819 @eval begin
1920 Base. promote_rule (:: Type{<:Static} , :: Type{T} ) where {T <: $S } = promote_rule (Int, T)
2021 Base. promote_rule (:: Type{T} , :: Type{<:Static} ) where {T <: $S } = promote_rule (T, Int)
@@ -27,7 +28,7 @@ Base.promote_rule(::Type{Union{Nothing,Missing}}, ::Type{<:Static}) = Union{Noth
2728Base. promote_rule (:: Type{T} , :: Type{<:Static} ) where {T >: Union{Missing,Nothing} } = promote_rule (T, Int)
2829Base. promote_rule (:: Type{T} , :: Type{<:Static} ) where {T >: Nothing } = promote_rule (T, Int)
2930Base. promote_rule (:: Type{T} , :: Type{<:Static} ) where {T >: Missing } = promote_rule (T, Int)
30- for T ∈ [:Bool , :Missing , :BigFloat , :BigInt , :Nothing ]
31+ for T ∈ [:Bool , :Missing , :BigFloat , :BigInt , :Nothing , :Any ]
3132# let S = :Any
3233 @eval begin
3334 Base. promote_rule (:: Type{S} , :: Type{$T} ) where {S <: Static } = promote_rule (Int, $ T)
0 commit comments