mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[CSBindings] Key path cannot be bound to typ erased type even if its existential
Extend existing check to handle type erased versions when they are wrapped in an existential.
This commit is contained in:
@@ -6389,6 +6389,11 @@ public:
|
||||
/// for a key path `{Any, Partial, Writable, ReferenceWritable}KeyPath`.
|
||||
bool isKnownKeyPathType(Type type);
|
||||
|
||||
/// Determine whether the given type is a PartialKeyPath and
|
||||
/// AnyKeyPath or existential type thererof, for example,
|
||||
/// `PartialKeyPath<...> & Sendable`.
|
||||
bool isTypeErasedKeyPathType(Type type);
|
||||
|
||||
/// Determine whether given declaration is one for a key path
|
||||
/// `{Writable, ReferenceWritable}KeyPath`.
|
||||
bool isKnownKeyPathDecl(ASTContext &ctx, ValueDecl *decl);
|
||||
|
||||
Reference in New Issue
Block a user