We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 61ecdea commit 9f0564cCopy full SHA for 9f0564c
lib/AST/Decl.cpp
@@ -4923,10 +4923,11 @@ conformanceExists(TypeDecl const *decl, InvertibleProtocolKind ip) {
4923
assert(proto && "missing Copyable/Escapable from stdlib!");
4924
4925
// Handle protocols specially, without building a GenericSignature.
4926
- if (auto *protoDecl = dyn_cast<ProtocolDecl>(decl))
4927
- return protoDecl->requiresInvertible(ip)
+ if (auto *protoDecl = dyn_cast<ProtocolDecl>(decl)) {
+ return protoDecl->inheritsFrom(proto)
4928
? TypeDecl::CanBeInvertible::Always
4929
: TypeDecl::CanBeInvertible::Never;
4930
+ }
4931
4932
Type selfTy = decl->getDeclaredInterfaceType();
4933
assert(selfTy);
0 commit comments