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.
2 parents be0ca0a + d8dcf8f commit 16dec4cCopy full SHA for 16dec4c
lib/AST/Decl.cpp
@@ -4727,6 +4727,10 @@ bool ProtocolDecl::existentialConformsToSelf() const {
4727
static SelfReferenceInfo
4728
findProtocolSelfReferences(const ProtocolDecl *proto, Type type,
4729
SelfReferencePosition position) {
4730
+ // If there are no type parameters, we're done.
4731
+ if (!type->hasTypeParameter())
4732
+ return SelfReferenceInfo();
4733
+
4734
// Tuples preserve variance.
4735
if (auto tuple = type->getAs<TupleType>()) {
4736
auto info = SelfReferenceInfo();
0 commit comments