Skip to content

[Clang importer] Look through typealiases when importing members of swift_wrappers. #9302

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
merged 1 commit into from
May 5, 2017

Conversation

DougGregor
Copy link
Member

When a swift_wrapper'd type is renamed from Swift 3 -> 4, we create a
typealias for it. We need to look through that typealias when
deserializing members of that type, e.g., global variables of the
swift_wrapper'd type.

Fixes rdar://problem/31939047.

@DougGregor
Copy link
Member Author

@swift-ci please smoke test and merge

@DougGregor DougGregor requested a review from jrose-apple May 4, 2017 23:20
@DougGregor DougGregor force-pushed the swift-wrapper-renamed branch from 80cbaed to 41cde06 Compare May 4, 2017 23:28
@DougGregor
Copy link
Member Author

@swift-ci please smoke test and merge

1 similar comment
@DougGregor
Copy link
Member Author

@swift-ci please smoke test and merge

@@ -7378,6 +7379,8 @@ ClangImporter::Implementation::importDeclContextOf(
auto decl = importDecl(clangDecl, CurrentVersion);
if (!decl) return nullptr;

importedDC = dynCastIgnoringCompatibilityAlias<NominalTypeDecl>(decl);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You didn't take out the old code here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh. Thanks.

…wift_wrappers.

When a swift_wrapper'd type is renamed from Swift 3 -> 4, we create a
typealias for it. We need to look through that typealias when
deserializing members of that type, e.g., global variables of the
swift_wrapper'd type.
@DougGregor DougGregor force-pushed the swift-wrapper-renamed branch from 41cde06 to 5934a86 Compare May 4, 2017 23:42
@DougGregor
Copy link
Member Author

@swift-ci please smoke test and merge

1 similar comment
@DougGregor
Copy link
Member Author

@swift-ci please smoke test and merge

@najacque najacque merged commit 69cab30 into swiftlang:master May 5, 2017
@DougGregor DougGregor deleted the swift-wrapper-renamed branch May 5, 2017 04:55
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.

3 participants