Skip to content

Commit 32afe1c

Browse files
committed
Trying fix for Julia 1.2.
1 parent dbb41cc commit 32afe1c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/static.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ Static(::Val{N}) where {N} = Static{N}()
1313
Base.Val(::Static{N}) where {N} = Val{N}()
1414
Base.convert(::Type{T}, ::Static{N}) where {T<:Number,N} = convert(T, N)
1515
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
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
2728
Base.promote_rule(::Type{T}, ::Type{<:Static}) where {T >: Union{Missing,Nothing}} = promote_rule(T, Int)
2829
Base.promote_rule(::Type{T}, ::Type{<:Static}) where {T >: Nothing} = promote_rule(T, Int)
2930
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]
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

Comments
 (0)