mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Give opened archetypes a generic environment.
And maybe allow nested types to live on them.
This commit is contained in:
@@ -3822,9 +3822,10 @@ void Serializer::writeType(Type ty) {
|
||||
case TypeKind::PrimaryArchetype:
|
||||
case TypeKind::NestedArchetype: {
|
||||
auto archetypeTy = cast<ArchetypeType>(ty.getPointer());
|
||||
assert(isa<PrimaryArchetypeType>(archetypeTy->getRoot())
|
||||
&& "need to implement for nested archetypes of opened/opaque types");
|
||||
|
||||
auto env = archetypeTy->getPrimary()->getGenericEnvironment();
|
||||
assert(env && "Primary archetype without generic environment?");
|
||||
auto env = archetypeTy->getGenericEnvironment();
|
||||
|
||||
GenericEnvironmentID envID = addGenericEnvironmentRef(env);
|
||||
Type interfaceType = archetypeTy->getInterfaceType();
|
||||
|
||||
Reference in New Issue
Block a user