# Documenting Fields of Parametric Type

**URL:** https://discourse.julialang.org/t/documenting-fields-of-parametric-type/15760
**Category:** General Usage
**Tags:** parametric-types
**Created:** [October 1, 2018, 9:31pm UTC](https://discourse.julialang.org/t/documenting-fields-of-parametric-type/15760 "2018-10-01T21:31:36Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![JaredCrean2](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jaredcrean2/32/3574_2.png) [@JaredCrean2](https://discourse.julialang.org/u/JaredCrean2)
#### Post date: [October 1, 2018, 9:31pm UTC](https://discourse.julialang.org/t/documenting-fields-of-parametric-type/15760/1 "2018-10-01T21:31:36Z")

</div>

I am having trouble documenting the fields of a parametric type, but not of a non-parametric type. Example:

```julia
"""
  This is struct Foo
"""
struct Foo{T}
  """
    This is field x
  """
  x
end

"""
  This is struct Bar
"""
struct Bar
  """
    This is field x
  """
  x
end

```

If this code is in file `tmp4.jl`, then in the repl I can get documentation for `Bar.x` but not `Foo.x` or `Foo{Float64}.x`:

```julia
julia> include("tmp4.jl")
Bar

help?> Foo
search: floor pointer_from_objref OverflowError RoundFromZero FileMonitor functionloc StackOverflowError

  This is struct Foo

help?> Foo{Float64}.x
ERROR: MethodError: no method matching Base.Docs.Binding(::Type{Foo{Float64}}, ::Symbol)
Closest candidates are:
  Base.Docs.Binding(::Module, ::Symbol) at docs/bindings.jl:12

help?> Foo.x
ERROR: MethodError: no method matching Base.Docs.Binding(::Type{Foo}, ::Symbol)
Closest candidates are:
  Base.Docs.Binding(::Module, ::Symbol) at docs/bindings.jl:12

help?> Bar
search: baremodule SubArray GlobalRef BitArray clipboard backtrace BitMatrix takebuf_array catch_backtrace

  This is struct Bar

help?> Bar.x

```

Did I do something wrong with the documentation, or is this a bug? The output is from julia 0.6, and is similar on 1.0

---

<div class="post-metadata">

### Author: ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)
#### Post date: [October 2, 2018, 5:12am UTC](https://discourse.julialang.org/t/documenting-fields-of-parametric-type/15760/2 "2018-10-02T05:12:06Z")

</div>

I think this is a bug.

---

<div class="post-metadata">

### Author: ![JaredCrean2](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jaredcrean2/32/3574_2.png) [@JaredCrean2](https://discourse.julialang.org/u/JaredCrean2)
#### Post date: [October 2, 2018, 1:43pm UTC](https://discourse.julialang.org/t/documenting-fields-of-parametric-type/15760/3 "2018-10-02T13:43:45Z")

</div>

Filed issue: [https://github.com/JuliaLang/julia/issues/29478](https://github.com/JuliaLang/julia/issues/29478)
