Skip to content

Commit

Permalink
Fix ambiguity of promote_rule in Julia 1.0 (< 1.3)
Browse files Browse the repository at this point in the history
  • Loading branch information
tkf committed May 23, 2020
1 parent 412ae8f commit 4ecc368
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/InitialValues.jl
Expand Up @@ -238,6 +238,9 @@ end
@disambiguate Base.max Missing

Base.promote_rule(::Type{I}, ::Type{S}) where {I<:InitialValue,S} = Union{I,S}
if VERSION < v"1.3"
Base.promote_rule(::Type{I}, ::Type{Any}) where {I<:InitialValue} = Any
end

const ZeroType = Union{
SpecificInitialValue{typeof(+)},
Expand Down
3 changes: 0 additions & 3 deletions test/runtests.jl
Expand Up @@ -3,9 +3,6 @@ using Test

@testset "$file" for file in sort([file for file in readdir(@__DIR__) if
match(r"^test_.*\.jl$", file) !== nothing])
# Ambiguity tests fail on Julia 1.0 as of writing.
VERSION < v"1.1" && file == "test_aqua.jl" && continue

include(file)
end

Expand Down

0 comments on commit 4ecc368

Please sign in to comment.