Skip to content

Commit

Permalink
fix UndefRefError for documentation system (#44060)
Browse files Browse the repository at this point in the history
* fix UndefRefError for documentation system

* add a test

Co-authored-by: Jameson Nash <jameson@juliacomputing.com>
  • Loading branch information
KristofferC and Jameson Nash authored Feb 15, 2022
1 parent 9542577 commit 4842007
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stdlib/REPL/src/docview.jl
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ function summarize(io::IO, TT::Type, binding::Binding)
println(io, "# Fields")
println(io, "```")
pad = maximum(length(string(f)) for f in fieldnames(T))
for (f, t) in zip(fieldnames(T), T.types)
for (f, t) in zip(fieldnames(T), fieldtypes(T))
println(io, rpad(f, pad), " :: ", t)
end
println(io, "```")
Expand Down
8 changes: 8 additions & 0 deletions stdlib/REPL/test/docview.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,11 @@ end
@testset "Unicode doc lookup (#41589)" begin
@test REPL.lookup_doc(:(÷=)) isa Markdown.MD
end

@testset "#44009" begin
R = Complex{<:Integer}
b = REPL.Binding(@__MODULE__, :R)
@test REPL.summarize(b, Tuple{}) isa Markdown.MD
end


0 comments on commit 4842007

Please sign in to comment.