mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Check root archetypes in a few more places.
This makes more code agnostic to the presence of NestedArchetypeType.
This commit is contained in:
@@ -2442,7 +2442,8 @@ public:
|
||||
// and not both.
|
||||
if (auto *archetypeType = t->getAs<ArchetypeType>()) {
|
||||
// Don't erase opaque archetype.
|
||||
if (isa<OpaqueTypeArchetypeType>(archetypeType))
|
||||
if (isa<OpaqueTypeArchetypeType>(archetypeType) &&
|
||||
archetypeType->isRoot())
|
||||
return t;
|
||||
|
||||
auto protos = archetypeType->getConformsTo();
|
||||
|
||||
Reference in New Issue
Block a user