-
Notifications
You must be signed in to change notification settings - Fork 34
Fixes for nightly #176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes for nightly #176
Changes from 1 commit
c3f7a07
be6499d
08fc5d9
27c92b4
bcb5b8d
a66676c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -452,10 +452,10 @@ kws = keywords(f, first(methods(f))) | |
| ``` | ||
| """ | ||
| function keywords(func, m::Method) | ||
| table = methods(func).mt | ||
| # table is a MethodTable object. For some reason, the :kwsorter field is not always | ||
| # defined. An undefined kwsorter seems to imply that there are no methods in the | ||
| # MethodTable with keyword arguments. | ||
| table::Core.MethodTable = VERSION ≥ v"1.13.0-DEV.647" ? Core.GlobalMethods : methods(func).mt | ||
| # For some reason, the :kwsorter field is not always defined. | ||
| # An undefined kwsorter seems to imply that there are no methods | ||
| # in the MethodTable with keyword arguments. | ||
| if !(Base.fieldindex(Core.MethodTable, :kwsorter, false) > 0) || isdefined(table, :kwsorter) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are we sure that removing the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure either. If Perhaps this is a remnant of a time where we used to only check statically for the type (with
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks like it got added very intentionally in https://github.com/JuliaDocs/DocStringExtensions.jl/pull/137/files But the theory is that it's not relevant for <= 1.4?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It got added here for "1.0 support". cc @MichaelHatherly -- any memories from 3 years ago? 😄
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just thinking a bit more: I think |
||
| # 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) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.