Rename ErrorType to ErrorProtocol

This commit is contained in:
Dmitri Gribenko
2015-11-03 18:58:39 -08:00
committed by Max Moiseev
parent 99d3f96c6d
commit feacbc4433
123 changed files with 1121 additions and 1118 deletions

View File

@@ -1783,8 +1783,8 @@ ConstraintSystem::matchTypes(Type type1, Type type2, TypeMatchKind kind,
conversionsOrFixes.push_back(ConversionRestrictionKind::BridgeFromObjC);
}
// Bridging from an ErrorType to an Objective-C NSError.
if (auto errorType = TC.Context.getProtocol(KnownProtocolKind::ErrorType)) {
// Bridging from an ErrorProtocol to an Objective-C NSError.
if (auto errorType = TC.Context.getProtocol(KnownProtocolKind::ErrorProtocol)) {
if (TC.containsProtocol(type1, errorType, DC,
ConformanceCheckFlags::InExpression))
if (auto NSErrorTy = TC.getNSErrorType(DC))
@@ -4217,8 +4217,8 @@ ConstraintSystem::simplifyRestrictedConstraint(ConversionRestrictionKind restric
case ConversionRestrictionKind::BridgeToNSError: {
increaseScore(SK_UserConversion); // FIXME: Use separate score kind?
// The input type must be an ErrorType subtype.
auto errorType = TC.Context.getProtocol(KnownProtocolKind::ErrorType)
// The input type must be an ErrorProtocol subtype.
auto errorType = TC.Context.getProtocol(KnownProtocolKind::ErrorProtocol)
->getDeclaredType();
return matchTypes(type1, errorType, TypeMatchKind::Subtype, subFlags,
locator);