AnyObject is a BridgeableObjectType even if it's not @objc.

Swift SVN r27412
This commit is contained in:
Joe Groff
2015-04-17 05:30:29 +00:00
parent bdbb5a9a5a
commit d46afe513e
2 changed files with 8 additions and 5 deletions

View File

@@ -1238,8 +1238,7 @@ static Type representsNonTrivialGenericParameter(TypeVariableType *typeVar) {
for (auto proto : archetype->getConformsTo()) {
// AnyObject is always trivially representable as a generic parameter;
// there is no runtime witness.
auto known = proto->getKnownProtocolKind();
if (known && *known == KnownProtocolKind::AnyObject)
if (proto->isSpecificProtocol(KnownProtocolKind::AnyObject))
continue;
// ObjC protocols are trivially representable as a generic parameter;