-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[CodeCompletion] Modifier related improvements in CompletionOverrideLookup #4518
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
Conversation
@swift-ci Please test |
Build failed |
f0c185e
to
d7d3a1e
Compare
@swift-ci Please test |
@benlangmuir Could you review this? |
if (hasInitializerModifier) | ||
return; | ||
|
||
if (!hasIntroducer || hasVarIntroducer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If someone wrote required var
or convenience func
, etc. I suggest we still give them var and func override completions. It's going to be invalid, but they can accept the fixits. So something like
if (hasVarIntroducer || (!hasIntroducer && !hasInitializerModifier)) {
and likewise for functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Makes sense!
And also for typealias. e.g. final typealias
Otherwise, LGTM! |
…ookup * If "required" or "convenience" is specified, emit only initializers * If "final" or "open" is specified, don't emit initializers or typealias * If "typealias" is specified, emit only associated type implementation * Emit "override" or "required" modifier for initializers * Emit access modifier for initializers * Emit designated initializers even if "override" is specified * Don't emit inheritance clause for associated type implentation
d7d3a1e
to
b827298
Compare
@swift-ci Please smoke test |
@swift-ci Please smoke test linux |
…-05-06 Merge 5.7 2022-05-06
What's in this pull request?
required
orconvenience
is specified, emit only initializersfinal
oropen
is specified, don't emit initializers or typealiastypealias
is specified, emit only associated type implementationoverride
orrequired
modifier for initializersoverride
is specifiedBefore merging this pull request to apple/swift repository:
Triggering Swift CI
The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:
Smoke Testing
A smoke test on macOS does the following:
device standard libraries are not built.
version of these tests are not run.
A smoke test on Linux does the following:
tests are not run.
Validation Testing
Lint Testing
Note: Only members of the Apple organization can trigger swift-ci.