mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +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:
@@ -239,8 +239,7 @@ Type SubstitutionMap::lookupSubstitution(CanSubstitutableType type) const {
|
||||
// If we have an archetype, map out of the context so we can compute a
|
||||
// conformance access path.
|
||||
if (auto archetype = dyn_cast<ArchetypeType>(type)) {
|
||||
if (archetype->isOpenedExistential() ||
|
||||
archetype->getParent() != nullptr)
|
||||
if (!isa<PrimaryArchetypeType>(archetype))
|
||||
return Type();
|
||||
|
||||
type = cast<GenericTypeParamType>(
|
||||
|
||||
Reference in New Issue
Block a user