Skip to content

[5.0] [Runtime] Properly unique foreign witness tables. #21303

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

DougGregor
Copy link
Member

The Name field of a type descriptor is not the appropriate
way to compare types for uniquing. Instead, use TypeContextIdentity.
Otherwise, we end up coalescing witness tables for two imported types
that have the same base name but are in different parent contexts, e.g.,
NSData.WritingOptions and JSONSerialization.WritingOptions.

Fixes rdar://problem/46685973.

The Name field of a type descriptor is not the appropriate
way to compare types for uniquing. Instead, use TypeContextIdentity.

Fixes rdar://problem/46685973.

(cherry picked from commit cacd72f)
@DougGregor DougGregor requested a review from a team as a code owner December 13, 2018 22:00
@DougGregor DougGregor changed the title [5.0] [5.0] [Runtime] Properly unique foreign witness tables. Dec 13, 2018
@DougGregor
Copy link
Member Author

@swift-ci please test

Copy link
Contributor

@rjmccall rjmccall left a comment

Choose a reason for hiding this comment

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

LGTM

@slavapestov
Copy link
Contributor

Oops!

@AnnaZaks AnnaZaks merged commit 901569c into swiftlang:swift-5.0-branch Dec 14, 2018
@DougGregor DougGregor deleted the runtime-unique-witness-tables-5.0 branch December 14, 2018 19:27
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.

4 participants