Skip to content

SILGen: Fix bug with bridging peephole #12456

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

slavapestov
Copy link
Contributor

When we peephole away a bridge from Objective-C followed by a
bridge to Objective-C where the destination type is AnyObject,
we need to force the source value if it was an optional.

Fixes rdar://problem/33669575.

When we peephole away a bridge from Objective-C followed by a
bridge to Objective-C where the destination type is AnyObject,
we need to force the source value if it was an optional.

Fixes <rdar://problem/33669575>.
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor Author

@rjmccall Tsk, tsk.

@slavapestov slavapestov merged commit a9a477a into swiftlang:master Oct 16, 2017
@rjmccall
Copy link
Contributor

Hmm. This is a reasonable short-term fix (and thank you for fixing it), but I wonder if we should just teach the peephole to introduce forces if they were there originally.

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