From c2241f779bf9a0ac86d2e4220c428a6035d780ed Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Sat, 23 May 2020 16:57:48 -0700 Subject: [PATCH] Fix ambiguity of promote_rule in Julia 1.0 (< 1.3) (#31) --- src/InitialValues.jl | 3 +++ test/runtests.jl | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/InitialValues.jl b/src/InitialValues.jl index ff174a65..bcf3424c 100644 --- a/src/InitialValues.jl +++ b/src/InitialValues.jl @@ -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(+)}, diff --git a/test/runtests.jl b/test/runtests.jl index 5134d6ed..646e32d5 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -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