I am having trouble documenting the fields of a parametric type, but not of a non-parametric type. Example:
"""
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> 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