Merge pull request #40282 from hborla/existential-any

[SE-0335] Introduce existential `any`
This commit is contained in:
Holly Borla
2021-12-10 08:56:03 -08:00
committed by GitHub
51 changed files with 1035 additions and 24 deletions

View File

@@ -3098,6 +3098,12 @@ public:
PrintWithColorRAII(OS, ParenthesisColor) << ')';
}
void visitExistentialTypeRepr(ExistentialTypeRepr *T) {
printCommon("type_existential");
printRec(T->getConstraint());
PrintWithColorRAII(OS, ParenthesisColor) << ')';
}
void visitPlaceholderTypeRepr(PlaceholderTypeRepr *T) {
printCommon("type_placeholder");
PrintWithColorRAII(OS, ParenthesisColor) << ')';
@@ -3930,6 +3936,13 @@ namespace {
PrintWithColorRAII(OS, ParenthesisColor) << ')';
}
void visitExistentialType(ExistentialType *T,
StringRef label) {
printCommon(label, "existential_type");
printRec(T->getConstraintType());
PrintWithColorRAII(OS, ParenthesisColor) << ')';
}
void visitLValueType(LValueType *T, StringRef label) {
printCommon(label, "lvalue_type");
printRec(T->getObjectType());