-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Function documentation ignored when not at toplevel #14962
Comments
I thought this was intentional. The |
Indeed it does. Maybe that's intentional and there are implications I'm not seeing, but that's certainly not user-friendly. |
What was the original intent here? |
@MichaelHatherly is this still a problem? |
Presumably covered by #20198? |
Still currently an issue. Can be seen in the wild with the |
Documentation also states that docstrings in if condition()
"..."
f(x) = x
end |
Yeah I wrote those docs and I was wrong, both about if and let blocks... Sorry... |
Not a big deal. I'm not sure if this issue is going to be addressed but we should update the documentation. The working syntax is: if true
@doc """
...
""" ->
f(x) = x
end |
I support inserting julia/base/reinterpretarray.jl Lines 27 to 50 in 4ed4195
|
if true
begin
"""
...
"""
f(x) = x
end
end works :P |
If you save the following code to a file and
include()
it, neither?f
nor?g
will print any documentation. Removing theif
fixes the problem. This is annoying when only adding a function depending on the Julia version, notably when extending a Base function which may not exist in older releases.The text was updated successfully, but these errors were encountered: