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 473faf1 commit b1d22ffCopy full SHA for b1d22ff
include/swift/AST/Types.h
@@ -4556,9 +4556,14 @@ inline bool TypeBase::mayHaveSuperclass() {
4556
if (getClassOrBoundGenericClass())
4557
return true;
4558
4559
+ // FIXME: requiresClass() is not the same as having an explicit superclass;
4560
+ // is this wrong?
4561
if (auto archetype = getAs<ArchetypeType>())
4562
return (bool)archetype->requiresClass();
4563
4564
+ if (isExistentialType())
4565
+ return (bool)getSuperclass(nullptr);
4566
+
4567
return is<DynamicSelfType>();
4568
}
4569
0 commit comments