The ambiguity computation was improved in JuliaLang/julia #36962. Accordingly, we need to rewrite the ambiguity test as follows:
if VERSION >= v"1.6.0-DEV.816" # JuliaLang/julia #36962
@test isempty(detect_ambiguities(ColorTypes))
else
@test isempty(detect_ambiguities(ColorTypes, Base, Core))
end
I don't yet fully understand why these are ambiguous. In particular, I'm not sure about the line:9 case. :confused:
_promote_color is tricky to begin with, so maybe it's better to write if statements instead of using multiple dispatch.
The ambiguity computation was improved in JuliaLang/julia #36962. Accordingly, we need to rewrite the ambiguity test as follows:
Although the change itself is acceptable, ambiguous methods are detected in
_promote_color
. https://github.com/JuliaGraphics/ColorTypes.jl/blob/bd31741d162361ebd44ed05ae532266998d9ce9f/src/conversions.jl#L8-L18 line:12 vs. line:9 line:12 vs. line:13 line:12 vs. line:14I don't yet fully understand why these are ambiguous. In particular, I'm not sure about the line:9 case. :confused:
_promote_color
is tricky to begin with, so maybe it's better to writeif
statements instead of using multiple dispatch.