Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The purpose of this PR is to finally add
instancemethods
to master. This function was created by @algunion in #50898 and #51068 in response to a question of mine on Discourse. @algunion seems to be busy at the moment and said that I could complete the PR.Recall that the idea of
instancemethods(T::Type)
is to return all methods for instances ofT
without the need to instantiate any object. I believe I have addressed all comments made in #51068. Some remarks about the current version:methods
contains the linejulia/base/reflection.jl
Line 1187 in 9ea29d9
which is currently not in
instancemethods
. Does it need to be added?The following gives an error at present:EDIT: Besides
Function
(which is already dealt with), alsoAny
andCore.Builtin
have the property thatBase.typename(T)
has no fieldmt
. This is fixed now.EDIT 2:
instancemethods(Core.Builtin)
gives an empty method list although builtin functions are instances of this type. Is this a problem?