-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
@code_*
can't handle anonymous function arguments
#16326
Comments
Way too complex in fact. Calling |
I don't really understand what you're saying here. Can you expand on that? |
Currently this works by calling |
The failing test appears to have already been broken, but I made it break in a more interesting way. Will see what I can do to fix, the usage is puzzling... @MichaelHatherly or @MikeInnes why do these tests use
|
It looks as though diff --git a/base/docs/utils.jl b/base/docs/utils.jl
index 0230039..0224ffd 100644
--- a/base/docs/utils.jl
+++ b/base/docs/utils.jl
@@ -150,12 +150,8 @@ repl(str::AbstractString) = :(apropos($str))
repl(other) = :(@doc $(esc(other)))
function _repl(x)
- docs = :(@doc $(esc(x)))
- if isexpr(x, :call)
- # Handles function call syntax where each argument is an atom (symbol, number, etc.)
- t = Base.gen_call_with_extracted_types(doc, x)
- (isexpr(t, :call, 3) && t.args[1] === doc) && (docs = t)
- end
+ docs = (isexpr(x, :call) && !any(isexpr(x, :(::)) for x in x.args)) ?
+ Base.gen_call_with_extracted_types(doc, x) : :(@doc $(esc(x)))
if isfield(x)
quote
if isa($(esc(x.args[1])), DataType) (The |
Update docs/utils.jl to pass test (h/t MichaelHatherly).
Thanks. That "works" in the sense that it doesn't error out, but I'm still rather puzzled.
When this is spliced, the expander returns a (quoted) syntax error. So |
Fix #16326: use typesof in code_* for all :call expressions
Update docs/utils.jl to pass test (h/t MichaelHatherly).
The text was updated successfully, but these errors were encountered: