Skip to content

[4.0] Handle IUO unwraps in key paths. #11005

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
Jul 18, 2017

Conversation

jckarter
Copy link
Contributor

Explanation: The compiler would crash when a key path literal included an implicit unwrap of an IUO.

Scope: Fixes a crash using key paths with IUO properties

Issue: rdar://problem/33230845

Risk: Low, bug fix isolated to key paths

Testing: Swift CI

In the type checker, we need to recognize when a member lookup succeeded through an IUO unwrap, and insert the implicit optional-unwrap component into the key path. In the standard library, we need to cope with the fact that IUO is still a first-class type with unique type metadata in a few places. Fix for rdar://problem/33230845.
@jckarter
Copy link
Contributor Author

@swift-ci Please test

@jckarter
Copy link
Contributor Author

@rudkx Does this look good for the 4.0 branch?

@jckarter jckarter requested a review from rudkx July 17, 2017 18:26
Copy link
Contributor

@rudkx rudkx left a comment

Choose a reason for hiding this comment

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

Yes, LGTM!

@jckarter jckarter merged commit c184647 into swiftlang:swift-4.0-branch Jul 18, 2017
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