Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

promote_type(Union{Void, Null, Int}, Float64) == Union{Null, Float64} on Julia 0.7 #47

Open
nalimilan opened this issue Oct 12, 2017 · 1 comment

Comments

@nalimilan
Copy link
Member

On latest Julia master, I see this:

julia> promote_type(Union{Void, Null, Int}, Float64)
Union{Nulls.Null, Float64}

It seems to be due to this definition, as removing it fixes the problem:

Base.promote_rule(::Type{T}, ::Type{Union{S,Null}}) where {T,S} =
    Union{promote_type(T, S), Null}

On Julia 0.6, this returns Any. I'm not sure when it changed on master but that's the first time I notice this. Is that a Julia bug?

@nalimilan
Copy link
Member Author

@JeffBezanson Would you say this is the correct behavior for Julia?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant