Skip to content

runtime: make the objc runtime mangling of AnyObject compatible to the swift 3 mangling #9410

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 9, 2017

Conversation

eeckstein
Copy link
Contributor

No description provided.

@eeckstein
Copy link
Contributor Author

@swift-ci Please smoke test and merge

assert(node->getKind() == Node::Kind::ProtocolList);
assert(node->getNumChildren() == 1);
auto typeList = node->begin()[0];
assert(typeList->getKind() == Node::Kind::TypeList);
for (auto &child : *typeList) {
mangleProtocolWithoutPrefix(child);
}
if (additionalProto) {
mangleProtocolWithoutPrefix(additionalProto);
Copy link
Contributor

Choose a reason for hiding this comment

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

There's one more nitpick. If you have P & AnyObject for some protocol P, then in Swift 3, it will mangle as either P & AnyObject or AnyObject & P, depending on how ProtocolType::canonicalizeProtocols() ordered AnyObject vs P. :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's file a radar for this. I think it's not that important for now

@swift-ci swift-ci merged commit 4405c47 into swiftlang:master May 9, 2017
@eeckstein eeckstein deleted the anyobj_mangling branch May 9, 2017 03:50
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