mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Push ArchetypeType's API down to subclasses.
And clean up code that conditionally works only with certain kinds of archetype along the way.
This commit is contained in:
@@ -1197,7 +1197,10 @@ private:
|
||||
case TypeKind::OpenedArchetype:
|
||||
case TypeKind::NestedArchetype: {
|
||||
auto *Archetype = BaseTy->castTo<ArchetypeType>();
|
||||
auto L = getDebugLoc(*this, Archetype->getAssocType());
|
||||
AssociatedTypeDecl *assocType = nullptr;
|
||||
if (auto nested = dyn_cast<NestedArchetypeType>(Archetype))
|
||||
assocType = nested->getAssocType();
|
||||
auto L = getDebugLoc(*this, assocType);
|
||||
auto Superclass = Archetype->getSuperclass();
|
||||
auto DerivedFrom = Superclass.isNull()
|
||||
? nullptr
|
||||
|
||||
Reference in New Issue
Block a user