mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[SE-0112] Rename ErrorProtocol to Error.
This is bullet (5) of the proposed solution in SE-0112, and the last major piece to be implemented.
This commit is contained in:
@@ -1717,9 +1717,9 @@ ConstraintSystem::matchTypes(Type type1, Type type2, TypeMatchKind kind,
|
||||
|
||||
// Check whether the source type is bridged to an Objective-C
|
||||
// class type. This conversion is implicit unless the bridged
|
||||
// value type is ErrorProtocol; this special rule is a subset of
|
||||
// value type is Error; this special rule is a subset of
|
||||
// SE-0072 that breaks an implicit conversion cycle between
|
||||
// NSError and ErrorProtocol.
|
||||
// NSError and Error.
|
||||
if (isBridgeableTargetType) {
|
||||
Type bridgedValueType;
|
||||
if (auto bridgedToObjCClass =
|
||||
@@ -1728,7 +1728,7 @@ ConstraintSystem::matchTypes(Type type1, Type type2, TypeMatchKind kind,
|
||||
if (*bridgedToObjCClass &&
|
||||
(kind >= TypeMatchKind::ExplicitConversion ||
|
||||
bridgedValueType->getAnyNominal() !=
|
||||
TC.Context.getErrorProtocolDecl()))
|
||||
TC.Context.getErrorDecl()))
|
||||
conversionsOrFixes.push_back(
|
||||
ConversionRestrictionKind::BridgeToObjC);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user