AST: Rename mapTypeIntoContext() => mapTypeIntoEnvironment(), mapTypeOutOfContext() => mapTypeOutOfEnvironment()

This commit is contained in:
Slava Pestov
2025-11-12 13:26:06 -05:00
parent e2287b6312
commit 819738c83e
179 changed files with 674 additions and 674 deletions

View File

@@ -9969,13 +9969,13 @@ ConstraintSystem::matchPackElementType(Type elementType, Type patternType,
}
auto shapeParam = CanGenericTypeParamType(cast<GenericTypeParamType>(
shapeClass->mapTypeOutOfContext()->getCanonicalType()));
shapeClass->mapTypeOutOfEnvironment()->getCanonicalType()));
auto *genericEnv = getPackExpansionEnvironment(packExpansion);
if (genericEnv) {
if (shapeParam != genericEnv->getOpenedElementShapeClass()) {
return tryFix([&]() {
auto envShape = genericEnv->mapTypeIntoContext(
auto envShape = genericEnv->mapTypeIntoEnvironment(
genericEnv->getOpenedElementShapeClass());
if (auto *pack = dyn_cast<PackType>(envShape))
envShape = pack->unwrapSingletonPackExpansion()->getPatternType();
@@ -11771,7 +11771,7 @@ ConstraintSystem::SolutionKind ConstraintSystem::simplifyMemberConstraint(
if (auto archetype =
baseTy->getMetatypeInstanceType()->getAs<ArchetypeType>()) {
if (auto genericTy =
archetype->mapTypeOutOfContext()->getAs<GenericTypeParamType>()) {
archetype->mapTypeOutOfEnvironment()->getAs<GenericTypeParamType>()) {
for (auto param : DC->getGenericSignatureOfContext()
.getGenericParams()) {
// Find a param at the same depth and one index past the type we're