|
97 | 97 | function show(io::IO, m::Method; kwtype::Nullable{DataType}=Nullable{DataType}())
|
98 | 98 | tv, decls, file, line = arg_decl_parts(m)
|
99 | 99 | sig = unwrap_unionall(m.sig)
|
100 |
| - ft = unwrap_unionall(sig.parameters[1]) |
| 100 | + ft0 = sig.parameters[1] |
| 101 | + ft = unwrap_unionall(ft0) |
101 | 102 | d1 = decls[1]
|
102 | 103 | if sig === Tuple
|
103 | 104 | print(io, m.name)
|
104 | 105 | decls = Any[(), ("...", "")]
|
105 |
| - elseif ft <: Function && |
| 106 | + elseif ft <: Function && isa(ft, DataType) && |
106 | 107 | isdefined(ft.name.module, ft.name.mt.name) &&
|
107 | 108 | # TODO: more accurate test? (tn.name === "#" name)
|
108 |
| - ft == typeof(getfield(ft.name.module, ft.name.mt.name)) |
| 109 | + ft0 === typeof(getfield(ft.name.module, ft.name.mt.name)) |
109 | 110 | print(io, ft.name.mt.name)
|
110 | 111 | elseif isa(ft, DataType) && ft.name === Type.body.name && isleaftype(ft)
|
111 | 112 | f = ft.parameters[1]
|
@@ -226,11 +227,12 @@ end
|
226 | 227 | function show(io::IO, ::MIME"text/html", m::Method; kwtype::Nullable{DataType}=Nullable{DataType}())
|
227 | 228 | tv, decls, file, line = arg_decl_parts(m)
|
228 | 229 | sig = unwrap_unionall(m.sig)
|
229 |
| - ft = sig.parameters[1] |
| 230 | + ft0 = sig.parameters[1] |
| 231 | + ft = unwrap_unionall(ft0) |
230 | 232 | d1 = decls[1]
|
231 |
| - if ft <: Function && |
| 233 | + if ft <: Function && isa(ft, DataType) && |
232 | 234 | isdefined(ft.name.module, ft.name.mt.name) &&
|
233 |
| - ft == typeof(getfield(ft.name.module, ft.name.mt.name)) |
| 235 | + ft0 === typeof(getfield(ft.name.module, ft.name.mt.name)) |
234 | 236 | print(io, ft.name.mt.name)
|
235 | 237 | elseif isa(ft, DataType) && ft.name === Type.body.name && isleaftype(ft)
|
236 | 238 | f = ft.parameters[1]
|
|
0 commit comments