Skip to content

Fix a compatibility suite regression involving the bridging peephole #13137

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

rjmccall
Copy link
Contributor

Weaken an assertion: conversions can go through Any but still end up at AnyObject?.

Also, ensure that @convention(block) functions can be erased to AnyObject, and teach SILGen how to do this with unchecked_ref_cast.

Fixes a source compatibility suite regression caused by #13078.

at AnyObject?.

Also, ensure that @convention(block) functions can be erased to
AnyObject, and teach SILGen how to do this with unchecked_ref_cast.

Fixes a source compatibility suite regression.
@rjmccall
Copy link
Contributor Author

@swift-ci Please test and merge.

@@ -523,6 +523,14 @@ ManagedValue Transform::transform(ManagedValue v,
SGF.getLoweredLoadableType(outputSubstType));
}

// - block to AnyObject conversion
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you make sure this doesn't happen on Linux, where blocks do not use Swift-compatible reference counting?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, #13153.

@rjmccall
Copy link
Contributor Author

@swift-ci Please test OS X.

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - ad0f8ab

@rjmccall
Copy link
Contributor Author

Okay, that seems to be a disjoint failure.

@swift-ci Please smoke test.

@rjmccall rjmccall merged commit 0ca496c into swiftlang:master Nov 29, 2017
@rjmccall rjmccall deleted the bridging-peephole-blocks-and-optionality branch November 29, 2017 20:29
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