Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempting to add a docstring to an anonymous function throws a BoundsError #57524

Open
xal-0 opened this issue Feb 24, 2025 · 0 comments
Open
Labels
bug Indicates an unexpected problem or unintended behavior docs This change adds or pertains to documentation error messages Better, more actionable error messages

Comments

@xal-0
Copy link
Member

xal-0 commented Feb 24, 2025

julia> "abcdf" function () end
ERROR: LoadError: BoundsError: attempt to access 0-element Vector{Any} at index [1]
Stacktrace:
 [1] throw_boundserror(A::Vector{Any}, I::Tuple{Int64})
   @ Base ./essentials.jl:14
 [2] getindex
   @ ./essentials.jl:916 [inlined]
 [3] astname(x::Expr, ismacro::Bool) (repeats 2 times)
   @ Base.Docs ./docs/Docs.jl:298
 [4] namify(x::Any)
   @ Base.Docs ./docs/Docs.jl:288
 [5] objectdoc(__source__::Any, __module__::Any, str::Any, def::Any, expr::Any, sig::Any)
   @ Base.Docs ./docs/Docs.jl:374
 [6] docm(source::LineNumberNode, mod::Module, meta::Any, ex::Any, define::Bool)
   @ Base.Docs ./docs/Docs.jl:594
 [7] docm(source::LineNumberNode, mod::Module, meta::Any, ex::Any)
   @ Base.Docs ./docs/Docs.jl:581
 [8] var"@doc"(::LineNumberNode, ::Module, ::String, ::Vararg{Any})
   @ Core ./boot.jl:646
in expression starting at REPL[1]:1
@xal-0 xal-0 added the error messages Better, more actionable error messages label Feb 24, 2025
@KristofferC KristofferC added the docs This change adds or pertains to documentation label Feb 24, 2025
@nsajko nsajko added the bug Indicates an unexpected problem or unintended behavior label Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior docs This change adds or pertains to documentation error messages Better, more actionable error messages
Projects
None yet
Development

No branches or pull requests

3 participants