-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Issue documenting splat methods #12701
Comments
Ok, looks like this is due to documenting the first element of this array: julia> methods(f, (Vararg{Any},))
2-element Array{Any,1}:
f() at none:2
f(x...) at none:2 |
It's due to this line where the first method from
|
Is it safe to change that to |
Related: #12518 |
The issue linked there gives an example where it isn't. |
Using |
👍, sounds fine to me. |
Combines the `doc(::Function)` and `doc(::DataType)` methods since they were nearly identical. Enables searching for docstrings attached to specific constructors in the same manner as is currently allowed for normal methods. Prior to this it resulted in a no method error. Fixes JuliaLang#12701 where splatted method docs were shadowing others. Although not the original cause of the issue, with the change to storing signatures as `Tuple{...}` (in JuliaLang#12835) this meant that `f(x...)` was stored as `Tuple{Vararg{Any}}` which is equal to `Tuple`. Since the default value of `sig` was `Tuple` not all matching docs were returned in the example provided in JuliaLang#12701.
Combines the `doc(::Function)` and `doc(::DataType)` methods since they were nearly identical. Enables searching for docstrings attached to specific constructors in the same manner as is currently allowed for normal methods. Prior to this it resulted in a no method error. Fixes #12701 where splatted method docs were shadowing others. Although not the original cause of the issue, with the change to storing signatures as `Tuple{...}` (in #12835) this meant that `f(x...)` was stored as `Tuple{Vararg{Any}}` which is equal to `Tuple`. Since the default value of `sig` was `Tuple` not all matching docs were returned in the example provided in #12701. (cherry picked from commit 1b1e6c6) ref #13330
Combines the `doc(::Function)` and `doc(::DataType)` methods since they were nearly identical. Enables searching for docstrings attached to specific constructors in the same manner as is currently allowed for normal methods. Prior to this it resulted in a no method error. Fixes JuliaLang#12701 where splatted method docs were shadowing others. Although not the original cause of the issue, with the change to storing signatures as `Tuple{...}` (in JuliaLang#12835) this meant that `f(x...)` was stored as `Tuple{Vararg{Any}}` which is equal to `Tuple`. Since the default value of `sig` was `Tuple` not all matching docs were returned in the example provided in JuliaLang#12701.
@MichaelHatherly you changed this recently so you might have some ideas.
which
is working correctly:The text was updated successfully, but these errors were encountered: