AST: Add ASTContext::TheSelfType for convenience

This commit is contained in:
Slava Pestov
2025-04-25 13:32:04 -04:00
parent 5d36643af4
commit cf1572c65b
13 changed files with 24 additions and 37 deletions

View File

@@ -783,7 +783,7 @@ emitKeyPathComponent(IRGenModule &IGM,
if (auto *openedExistential =
t->getAs<ExistentialArchetypeType>()) {
auto &ctx = openedExistential->getASTContext();
return GenericTypeParamType::getType(0, 0, ctx);
return ctx.TheSelfType;
}
return std::nullopt;
})