Skip to content

Commit b1c3df3

Browse files
committed
fix #9001
1 parent b923a43 commit b1c3df3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

base/docs.jl

+4-2
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ function newmethod(funcs, f)
5656
end
5757

5858
function trackmethod(def)
59-
name = namify(unblock(def))
59+
name = uncurly(unblock(def).args[1].args[1])
6060
f = esc(name)
6161
quote
62-
if isdefined($(Expr(:quote, name))) && isgeneric($f)
62+
if $(isexpr(name, Symbol)) && isdefined($(Expr(:quote, name))) && isgeneric($f)
6363
funcs = [def => def.func for def in methods($f)]
6464
$(esc(def))
6565
$f, newmethod(funcs, $f)
@@ -127,6 +127,8 @@ function unblock(ex)
127127
return exs[1]
128128
end
129129

130+
uncurly(ex) = isexpr(ex, :curly) ? ex.args[1] : ex
131+
130132
namify(ex::Expr) = namify(ex.args[1])
131133
namify(sy::Symbol) = sy
132134

0 commit comments

Comments
 (0)