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

Docsystem doesn't work with nospecialize #34122

Closed
timholy opened this issue Dec 17, 2019 · 0 comments · Fixed by #34125
Closed

Docsystem doesn't work with nospecialize #34122

timholy opened this issue Dec 17, 2019 · 0 comments · Fixed by #34125
Labels
docsystem The documentation building system

Comments

@timholy
Copy link
Sponsor Member

timholy commented Dec 17, 2019

The docsystem thinks these two methods are the same despite Julia itself knowing better:

julia> module DS

       """
       `f` for Numbers
       """
       f(@nospecialize(x::Number)) = 1

       """
       `f` for arrays
       """
       f(@nospecialize(x::AbstractArray)) = 2

       end
┌ Warning: Replacing docs for `Main.DS.f :: Tuple{Any}` in module `Main.DS`
└ @ Base.Docs docs/Docs.jl:223
Main.DS

help?> DS.f
  f for arrays

julia> DS.f(1)
1

julia> DS.f([1])
2
@fredrikekre fredrikekre added the docsystem The documentation building system label Dec 17, 2019
JeffBezanson added a commit that referenced this issue Dec 19, 2019
Docsystem: unwrap nospecialize (fixes #34122)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docsystem The documentation building system
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants