CF <-> NS bridging is a subtype. Fixes rdar://problem/18297881

Swift SVN r21922
This commit is contained in:
Doug Gregor
2014-09-12 20:57:53 +00:00
parent e002261865
commit 713ba3edd8
2 changed files with 10 additions and 1 deletions

View File

@@ -1443,7 +1443,8 @@ ConstraintSystem::matchTypes(Type type1, Type type2, TypeMatchKind kind,
}
// Check for CF <-> ObjectiveC bridging.
if (desugar1->getKind() == TypeKind::Class) {
if (desugar1->getKind() == TypeKind::Class &&
kind >= TypeMatchKind::Subtype) {
auto class1 = cast<ClassDecl>(nominal1->getDecl());
auto class2 = cast<ClassDecl>(nominal2->getDecl());