Skip to content

Commit 4842007

Browse files
KristofferCJameson Nash
andauthored
fix UndefRefError for documentation system (#44060)
* fix UndefRefError for documentation system * add a test Co-authored-by: Jameson Nash <[email protected]>
1 parent 9542577 commit 4842007

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

stdlib/REPL/src/docview.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ function summarize(io::IO, TT::Type, binding::Binding)
283283
println(io, "# Fields")
284284
println(io, "```")
285285
pad = maximum(length(string(f)) for f in fieldnames(T))
286-
for (f, t) in zip(fieldnames(T), T.types)
286+
for (f, t) in zip(fieldnames(T), fieldtypes(T))
287287
println(io, rpad(f, pad), " :: ", t)
288288
end
289289
println(io, "```")

stdlib/REPL/test/docview.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,11 @@ end
5151
@testset "Unicode doc lookup (#41589)" begin
5252
@test REPL.lookup_doc(:(÷=)) isa Markdown.MD
5353
end
54+
55+
@testset "#44009" begin
56+
R = Complex{<:Integer}
57+
b = REPL.Binding(@__MODULE__, :R)
58+
@test REPL.summarize(b, Tuple{}) isa Markdown.MD
59+
end
60+
61+

0 commit comments

Comments
 (0)