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

Printing two methods when only calling for one #1523

Closed
albinahlback opened this issue Feb 5, 2021 · 6 comments
Closed

Printing two methods when only calling for one #1523

albinahlback opened this issue Feb 5, 2021 · 6 comments

Comments

@albinahlback
Copy link

I get two methods printed when I only want the last one printed. The document call gets made by

    ```@docs
    basis(::ModularForms.ModularFormsSpaceSL2Z{R}) where R
    ```

See picture below for the result.
Screenshot from 2021-02-05 23-11-25
This happens for other functions as well. What module they belong to does not seem to matter. Am I doing something wrong?

@albinahlback
Copy link
Author

I would like to add that I have not called for using or importing basis.

@albinahlback
Copy link
Author

I get this problem also on some places for methods only defined in my module. However, on other functions with multiple methods it seems to work as I think it should.

@mortenpi
Copy link
Member

mortenpi commented Feb 9, 2021

What type exactly is NfAbsOrdFracIdl? It's quite likely that we're not doing the right thing when selecting for the methods (see also #839). Could put together an MWE based on your example?

@albinahlback
Copy link
Author

Okay, so this problem seems to arise with types having input arguments, please see the picture below. See my repository for the MWE.
Screenshot from 2021-02-10 11-57-15

@kimikage
Copy link
Contributor

julia> Base.Docs.signature(:(fun(::Testdocs.foo1{T}) where T))
:(Union{Tuple{Testdocs.foo1{T}}, Tuple{T}} where T <: Any)

Where did Tuple{T} come from? 🤔

For now, a workaround is to not use the where keyword. 😅

@doc Markdown.doc"""
    fun(a::foo1{T})

Documentation1
"""
fun(a::foo1)
fun(a::foo1{T}) where T = 1

@kimikage
Copy link
Contributor

xref: JuliaLang/julia#29437

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants