diff --git a/stdlib/REPL/src/docview.jl b/stdlib/REPL/src/docview.jl index a9ecd1e4bb1e4..66f2aba86384d 100644 --- a/stdlib/REPL/src/docview.jl +++ b/stdlib/REPL/src/docview.jl @@ -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, "```") diff --git a/stdlib/REPL/test/docview.jl b/stdlib/REPL/test/docview.jl index 160544eb475d2..9757cdb5df097 100644 --- a/stdlib/REPL/test/docview.jl +++ b/stdlib/REPL/test/docview.jl @@ -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 + +