mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #40282 from hborla/existential-any
[SE-0335] Introduce existential `any`
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user