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

@@ -6945,6 +6945,7 @@ Expr *ExprRewriter::coerceToType(Expr *expr, Type toType,
case TypeKind::Struct:
case TypeKind::Protocol:
case TypeKind::ProtocolComposition:
case TypeKind::Existential:
case TypeKind::BoundGenericEnum:
case TypeKind::BoundGenericStruct:
case TypeKind::GenericFunction:
@@ -6957,6 +6958,7 @@ Expr *ExprRewriter::coerceToType(Expr *expr, Type toType,
auto desugaredToType = toType->getDesugaredType();
switch (desugaredToType->getKind()) {
// Coercions from a type to an existential type.
case TypeKind::Existential:
case TypeKind::ExistentialMetatype:
case TypeKind::ProtocolComposition:
case TypeKind::Protocol: