Skip to content

Commit

Permalink
removed deprecated parameter to Base.kwarg_decl
Browse files Browse the repository at this point in the history
  • Loading branch information
vtjnash authored Oct 15, 2022
1 parent 58aac73 commit 9fcd5bf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/method.jl
Original file line number Diff line number Diff line change
Expand Up @@ -247,12 +247,15 @@ function kwargs(m::Method)
return names
end

if VERSION >= v"1.4-"
kwarg_names(m::Method) = Base.kwarg_decl(m)
else
function kwarg_names(m::Method)
mt = Base.get_methodtable(m)
!isdefined(mt, :kwsorter) && return [] # no kwsorter means no keywords for sure.
return Base.kwarg_decl(m, typeof(mt.kwsorter))
end

end


"""
Expand Down

0 comments on commit 9fcd5bf

Please sign in to comment.