Skip to content

[3.1] [Clang importer] When importing a property as accessors, use accessor types #6906

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

Conversation

DougGregor
Copy link
Member

When importing a property as accessor methods (rather than as a
property), we were still importing the type of the accessor methods as
if they were Swift getters and setters of a property, which
(necessarily) homogenizes the types. The homogenization is unnecessary
when importing as accessor methods, because the methods are
independent, so just import the accessor method types as if the
property did not exist. This is particularly useful for maintaining
Swift 3 source compatibility for cases where Swift 4 turns a
getter/setter pair into a null_resettable property.

Fixes rdar://problem/30075571.

(cherry picked from commit 609f9b5)

… types.

When importing a property as accessor methods (rather than as a
property), we were still importing the type of the accessor methods as
if they were Swift getters and setters of a property, which
(necessarily) homogenizes the types. The homogenization is unnecessary
when importing as accessor methods, because the methods are
independent, so just import the accessor method types as if the
property did not exist. This is particularly useful for maintaining
Swift 3 source compatibility for cases where Swift 4 turns a
getter/setter pair into a null_resettable property.

Fixes rdar://problem/30075571.

(cherry picked from commit 609f9b5)
@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor DougGregor changed the title [Clang importer] When importing a property as accessors, use accessor types [3.1] [Clang importer] When importing a property as accessors, use accessor types Jan 19, 2017
@ematejska ematejska merged commit 4f9f0e8 into swiftlang:swift-3.1-branch Jan 19, 2017
@DougGregor DougGregor deleted the import-property-accesors-3_1 branch January 20, 2017 00:14
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.

2 participants