Skip to content

Bug when documenting callable parametric struct #44889

@jaemolihm

Description

@jaemolihm

Similar to #20087, but for parametric structs.

"""Docs for Parametric struct """
struct Parametric{T} end

"""Docs for Parametric func"""
function (f::Parametric{T})(x) where {T} end


"""Docs for NonParametric struct """
struct NonParametric end

"""Docs for NonParametric func"""
function (f::NonParametric)(x) end

@doc Parametric
@doc NonParametric
@doc f

Output:

julia> @doc Parametric
  Docs for Parametric struct
julia> @doc NonParametric
  Docs for NonParametric struct

  Docs for NonParametric func
julia> @doc f
  Docs for Parametric func
julia> versioninfo()
Julia Version 1.7.0
Commit 3bf9d17731 (2021-11-30 12:12 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, haswell)
Environment:
  JULIA = /home/jmlim/appl/julia-1.7.0/bin/julia
  JULIA_EDITOR = code
  JULIA_NUM_THREADS = 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions