File tree Expand file tree Collapse file tree 2 files changed +10
-15
lines changed Expand file tree Collapse file tree 2 files changed +10
-15
lines changed Original file line number Diff line number Diff line change @@ -4552,21 +4552,6 @@ inline CanType CanType::getNominalParent() const {
4552
4552
}
4553
4553
}
4554
4554
4555
- 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
-
4570
4555
inline TupleTypeElt::TupleTypeElt (Type ty, Identifier name, bool isVariadic,
4571
4556
bool isAutoClosure, bool isEscaping)
4572
4557
: Name(name), ElementType(ty),
Original file line number Diff line number Diff line change @@ -1562,6 +1562,16 @@ LayoutConstraint TypeBase::getLayoutConstraint() {
1562
1562
return LayoutConstraint ();
1563
1563
}
1564
1564
1565
+ bool TypeBase::mayHaveSuperclass () {
1566
+ if (getClassOrBoundGenericClass ())
1567
+ return true ;
1568
+
1569
+ if (auto archetype = getAs<ArchetypeType>())
1570
+ return (bool )archetype->requiresClass ();
1571
+
1572
+ return is<DynamicSelfType>();
1573
+ }
1574
+
1565
1575
Type TypeBase::getSuperclass (LazyResolver *resolver) {
1566
1576
auto *nominalDecl = getAnyNominal ();
1567
1577
auto *classDecl = dyn_cast_or_null<ClassDecl>(nominalDecl);
You can’t perform that action at this time.
0 commit comments