@@ -13,8 +13,9 @@ Static(::Val{N}) where {N} = Static{N}()
13
13
Base. Val (:: Static{N} ) where {N} = Val {N} ()
14
14
Base. convert (:: Type{T} , :: Static{N} ) where {T<: Number ,N} = convert (T, N)
15
15
Base. 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
18
19
@eval begin
19
20
Base. promote_rule (:: Type{<:Static} , :: Type{T} ) where {T <: $S } = promote_rule (Int, T)
20
21
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
27
28
Base. promote_rule (:: Type{T} , :: Type{<:Static} ) where {T >: Union{Missing,Nothing} } = promote_rule (T, Int)
28
29
Base. promote_rule (:: Type{T} , :: Type{<:Static} ) where {T >: Nothing } = promote_rule (T, Int)
29
30
Base. 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 ]
31
32
# let S = :Any
32
33
@eval begin
33
34
Base. promote_rule (:: Type{S} , :: Type{$T} ) where {S <: Static } = promote_rule (Int, $ T)
0 commit comments