-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into case-paths-core
- Loading branch information
Showing
8 changed files
with
53 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#if compiler(>=6) | ||
public typealias _SendableKeyPath<Root, Value> = any Sendable & KeyPath<Root, Value> | ||
#else | ||
public typealias _SendableKeyPath<Root, Value> = KeyPath<Root, Value> | ||
#endif | ||
|
||
// NB: Dynamic member lookup does not currently support sendable key paths and even breaks | ||
// autocomplete. | ||
// | ||
// * https://github.com/swiftlang/swift/issues/77035 | ||
// * https://github.com/swiftlang/swift/issues/77105 | ||
extension _AppendKeyPath { | ||
@_transparent | ||
package func unsafeSendable<Root, Value>() -> _SendableKeyPath<Root, Value> | ||
where Self == KeyPath<Root, Value> { | ||
#if compiler(>=6) | ||
unsafeBitCast(self, to: _SendableKeyPath<Root, Value>.self) | ||
#else | ||
self | ||
#endif | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters