Fix ?(#TAB method search name exploration #52555
Merged
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.
Fix #52551.
This PR ensures that a
SomeModule.?(...#TAB
completion can only suggests methodfoo
such thatSomeModule.foo
exists (by checkingisdefined(SomeModule, :foo)
). This is equivalent, I believe, to the initial implementation of #38791, less the bug.Now that we have #51345, we may want to relax the above condition somewhat to include public names present in modules loaded into
SomeModule
, so that, for instance, a direct completion of?(
would include@assume_effects
. This could be good for method exploration because even though typing@assume_effects
with no qualification inMain
will error, the error now includes the helpful messageBut that can wait for a later PR anyway, this one is just the bugfix.
The bug mentioned at #52551 (comment) dates from the initial #38791 so this could be backported as far back as v1.8.