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 ec10c5d commit d8dcf8fCopy full SHA for d8dcf8f
lib/AST/Decl.cpp
@@ -4704,6 +4704,10 @@ bool ProtocolDecl::existentialConformsToSelf() const {
4704
static SelfReferenceInfo
4705
findProtocolSelfReferences(const ProtocolDecl *proto, Type type,
4706
SelfReferencePosition position) {
4707
+ // If there are no type parameters, we're done.
4708
+ if (!type->hasTypeParameter())
4709
+ return SelfReferenceInfo();
4710
+
4711
// Tuples preserve variance.
4712
if (auto tuple = type->getAs<TupleType>()) {
4713
auto info = SelfReferenceInfo();
0 commit comments