Give opened archetypes a generic environment.

And maybe allow nested types to live on them.
This commit is contained in:
Joe Groff
2019-01-07 16:03:27 -08:00
parent 345e9881d1
commit 0cfca9496a
16 changed files with 105 additions and 41 deletions

View File

@@ -122,7 +122,9 @@ Type GenericEnvironment::mapTypeIntoContext(GenericEnvironment *env,
}
Type MapTypeOutOfContext::operator()(SubstitutableType *type) const {
return cast<ArchetypeType>(type)->getInterfaceType();
auto archetype = cast<ArchetypeType>(type);
return archetype->getInterfaceType();
}
Type TypeBase::mapTypeOutOfContext() {