diff --git a/base/parse.jl b/base/parse.jl index 1097e8a19b804..e9be18af9bac2 100644 --- a/base/parse.jl +++ b/base/parse.jl @@ -380,6 +380,8 @@ parse(::Type{T}, s::AbstractString; kwargs...) where T<:Real = convert(T, tryparse_internal(T, s, true; kwargs...)) parse(::Type{T}, s::AbstractString) where T<:Complex = convert(T, tryparse_internal(T, s, firstindex(s), lastindex(s), true)) +parse(::Type{T}, s::Union{Missing, Nothing}) where T<:Number = missing tryparse(T::Type{Complex{S}}, s::AbstractString) where S<:Real = tryparse_internal(T, s, firstindex(s), lastindex(s), false) +tryparse(::Type{T}, s::Union{Missing, Nothing}) where T<:Number = missing