-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Bug in hasmethod(f, Tuple{Union{}})
#30808
Labels
types and dispatch
Types, subtyping and method dispatch
Comments
I think this is because these code paths never need to handle |
This was referenced Apr 14, 2020
Looks like this issue has been fixed. I've tested on both 1.6.4 and 1.7.0-rc3. julia> hasmethod((::Int)->nothing, Tuple{Union{}})
true
julia> hasmethod((::Integer)->nothing, Tuple{Union{}})
true |
tk3369
added a commit
to tk3369/BinaryTraits.jl
that referenced
this issue
Nov 24, 2021
The custom logic was originally developed to address a Bottom type issue with julialang (JuliaLang/julia#30808). However, the custom logic does not work properly for UnionAll signatures as seen from #54. It appears that the original Julia hasmethod issue has been resolved. See my latest comment in that issue. So, I'm removing the custom logic here. All tests pass.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following should be true:
Note that
hasmethod()
works as expected if the function is defined in terms of an abstract type.Related discourse discussion here.
The text was updated successfully, but these errors were encountered: