-
Notifications
You must be signed in to change notification settings - Fork 10.5k
DI fixes for resilience #12386
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
Merged
slavapestov
merged 13 commits into
swiftlang:master
from
slavapestov:most-definitely-self
Oct 14, 2017
Merged
DI fixes for resilience #12386
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
e515563
DI: Consolidate and clean up some diagnostics
slavapestov 5ffbd28
DI: Fix diagnostic for return from address-only initializer without c…
slavapestov 9a7a1de
DI: Look through begin_access/end_access for assignment to self
slavapestov c3cf4ac
DI: For value types, handle self.init like an assignment instead of v…
slavapestov 0c16aed
DI: All protocol extension initializers should be delegating
slavapestov b5eeae7
DI: All enum initializers should be delegating
slavapestov 065cbd8
AST: Struct initializers that assign to self can now be resilient
slavapestov 94d4b5a
DI: Small cleanup now that SelfInit is only used for classes and clas…
slavapestov ff34f3b
DI: Remove shouldIgnoreClassMethodUseError()
slavapestov 421797c
DI: Fold handleSuperInitUse() into handleSelfInitUse()
slavapestov 1bcfc50
DI: Kill off collectBorrowedSuperUses()
slavapestov 1feaf9e
DI: Kill off checkClassSelfUpcastUsedBySuperInit()
slavapestov d8153b3
DI: Correctly flag escaping uses of 'self' when 'self' is passed as a…
slavapestov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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.
Nitpick: why have three separate messages here, when it's still a choice above?
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.
Because the choice was keyed purely on whether its a delegating init or not, but I also want to distinguish the value type case so that diagnostics say that an assignment to self is OK too. I'll probably rework the other diagnostics when I do the fix for the return location analysis.
If you think they should still be a single diagnostic with a %select, I don't mind doing that. It seemed a bit silly to define a new enum that's only used in one place, but if I see other diagnostics get too repetitive I can do it.