Skip to content
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

[4.2] Allow synthesis of conformances in same-file extensions. #16439

Merged

Conversation

huonw
Copy link
Contributor

@huonw huonw commented May 8, 2018

#16376 and #16436. Fixes rdar://problem/39199726 and https://bugs.swift.org/browse/SR-6803.

huonw added 10 commits May 7, 2018 15:38
Instead of passing around a TypeChecker and three Decls (the nominal type, the
protocol, and the decl declaring the conformance) everywhere, we can just pass
one object.

This should be [NFC].
This works for all protocols except for Decodable on non-final classes, because
the init requirement has to be 'required' and thus in the type's declaration.

Fixes most of https://bugs.swift.org/browse/SR-6803.
'private' properties can't be accessed in extensions in Swift 3, so synthesizing
a conformance that reads from such things is going to be incorrect in an
extension.
@huonw
Copy link
Contributor Author

huonw commented May 8, 2018

@swift-ci please test

@swift-ci
Copy link
Collaborator

swift-ci commented May 9, 2018

Build failed
Swift Test OS X Platform
Git Sha - 817a7d5

@huonw
Copy link
Contributor Author

huonw commented May 9, 2018

@swift-ci please test macOS platform

@huonw huonw merged commit 91e07e9 into apple:swift-4.2-branch May 9, 2018
@huonw huonw deleted the same-file-extension-restructure-4.2 branch May 9, 2018 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants