Skip to content

Commit

Permalink
Update src/utilities.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
mortenpi authored Aug 13, 2024
1 parent aec4f32 commit 19b8aba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utilities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ function keywords(func, m::Method)
if !(Base.fieldindex(Core.MethodTable, :kwsorter, false) > 0) || isdefined(table, :kwsorter)
# Fetching method keywords stolen from base/replutil.jl:572-576 (commit 3b45cdc9aab0):
kwargs = VERSION < v"1.4.0-DEV.215" ? Base.kwarg_decl(m, typeof(table.kwsorter)) : Base.kwarg_decl(m)
if isa(kwargs, Vector) && length(kwargs) > 0 && kwargs != [:...] # in julia 1.10 sometimes kwargs is `[:...]`, ignore that
if isa(kwargs, Vector) && length(kwargs) > 0
filter!(arg -> !occursin("#", string(arg)), kwargs)
# Keywords *may* not be sorted correctly. We move the vararg one to the end.
index = findfirst(arg -> endswith(string(arg), "..."), kwargs)
Expand Down

0 comments on commit 19b8aba

Please sign in to comment.