@@ -181,11 +181,6 @@ function _methods(f::ANY,t::ANY,lim)
181
181
tt = isa (t,Type) ? Tuple{ft, t. parameters... } : Tuple{ft, t... }
182
182
return _methods_by_ftype (tt, lim)
183
183
end
184
- function methods_including_ambiguous (f:: ANY , t:: ANY )
185
- ft = isa (f,Type) ? Type{f} : typeof (f)
186
- tt = isa (t,Type) ? Tuple{ft, t. parameters... } : Tuple{ft, t... }
187
- return ccall (:jl_matching_methods , Any, (Any,Cint,Cint), tt, - 1 , 1 )
188
- end
189
184
function _methods_by_ftype (t:: ANY , lim)
190
185
tp = t. parameters:: SimpleVector
191
186
nu = 1
255
250
256
251
methods (f:: Builtin ) = MethodList (Method[], typeof (f). name. mt)
257
252
253
+ function methods_including_ambiguous (f:: ANY , t:: ANY )
254
+ ft = isa (f,Type) ? Type{f} : typeof (f)
255
+ tt = isa (t,Type) ? Tuple{ft, t. parameters... } : Tuple{ft, t... }
256
+ ms = ccall (:jl_matching_methods , Any, (Any,Cint,Cint), tt, - 1 , 1 ):: Array{Any,1}
257
+ return MethodList (Method[m[3 ] for m in ms], typeof (f). name. mt)
258
+ end
259
+
258
260
function methods (f:: ANY )
259
261
# return all matches
260
262
return methods (f, Tuple{Vararg{Any}})
0 commit comments