mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Rename ErrorType to ErrorProtocol
This commit is contained in:
committed by
Max Moiseev
parent
99d3f96c6d
commit
feacbc4433
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user