- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 5.7k
Closed
Labels
types and dispatchTypes, subtyping and method dispatchTypes, subtyping and method dispatch
Description
julia> VERSION
v"1.3.0-alpha.38"
julia> [0, nothing, 0.0, missing]
ERROR: MethodError: convert(::Type{Union{Missing, Nothing, Float64}}, ::Int64) is ambiguous. Candidates:
  convert(::Type{Union{Missing, T}}, x) where T in Base at missing.jl:42
  convert(::Type{Union{Nothing, T}}, x) where T in Base at some.jl:23
Possible fix, define
  convert(::Type{Union{Missing, Nothing}}, ::Any)
Stacktrace:
 [1] setindex!(::Array{Union{Missing, Nothing, Float64},1}, ::Int64, ::Int64) at ./array.jl:780
 [2] copyto!(::Array{Union{Missing, Nothing, Float64},1}, ::Tuple{Int64,Nothing,Float64,Missing}) at ./abstractarray.jl:725
 [3] vect(::Int64, ::Vararg{Any,N} where N) at ./array.jl:151
 [4] top-level scope at REPL[2]:1It works in 1.2.0-rc2.0.
Metadata
Metadata
Assignees
Labels
types and dispatchTypes, subtyping and method dispatchTypes, subtyping and method dispatch