Closed
Description
openedon Aug 28, 2020
I think this should not be allowed:
julia> f(::Type{Union{}}) = "a"
f (generic function with 1 method)
julia> f(::Type{<:Union{}}) = "b"
f (generic function with 2 methods)
julia> methods(f)
# 2 methods for generic function "f":
[1] f(::Type{var"#s1"} where var"#s1"<:Union{}) in Main at REPL[2]:1
[2] f(::Type{Union{}}) in Main at REPL[1]:1
julia> f(Union{})
"b"
and the compiler should identify that these two signatures are identical as Union{}
is bottom type.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
No labels