-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
* Clean up key path bitcasting. * wip * wip --------- Co-authored-by: Stephen Celis <[email protected]>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,27 @@ | ||
#if compiler(>=6) | ||
public typealias _AnyKeyPath = any AnyKeyPath & Sendable | ||
public typealias _PartialKeyPath<Root> = any PartialKeyPath<Root> & Sendable | ||
public typealias _KeyPath<Root, Value> = any KeyPath<Root, Value> & Sendable | ||
public typealias _WritableKeyPath<Root, Value> = any WritableKeyPath<Root, Value> & Sendable | ||
public typealias _ReferenceWritableKeyPath<Root, Value> = any ReferenceWritableKeyPath< | ||
public typealias _SendableAnyKeyPath = any AnyKeyPath & Sendable | ||
public typealias _SendablePartialKeyPath<Root> = any PartialKeyPath<Root> & Sendable | ||
public typealias _SendableKeyPath<Root, Value> = any KeyPath<Root, Value> & Sendable | ||
public typealias _SendableWritableKeyPath<Root, Value> = any WritableKeyPath<Root, Value> & Sendable | ||
public typealias _SendableReferenceWritableKeyPath<Root, Value> = any ReferenceWritableKeyPath< | ||
Root, Value | ||
> | ||
& Sendable | ||
public typealias _PartialCaseKeyPath<Root> = any PartialCaseKeyPath<Root> & Sendable | ||
public typealias _CaseKeyPath<Root, Value> = any CaseKeyPath<Root, Value> & Sendable | ||
public typealias _SendablePartialCaseKeyPath<Root> = any PartialCaseKeyPath<Root> & Sendable | ||
public typealias _SendableCaseKeyPath<Root, Value> = any CaseKeyPath<Root, Value> & Sendable | ||
#else | ||
public typealias _AnyKeyPath = AnyKeyPath | ||
public typealias _PartialKeyPath<Root> = PartialKeyPath<Root> | ||
public typealias _KeyPath<Root, Value> = KeyPath<Root, Value> | ||
public typealias _WritableKeyPath<Root, Value> = WritableKeyPath<Root, Value> | ||
public typealias _ReferenceWritableKeyPath<Root, Value> = ReferenceWritableKeyPath<Root, Value> | ||
public typealias _PartialCaseKeyPath<Root> = PartialCaseKeyPath<Root> | ||
public typealias _CaseKeyPath<Root, Value> = CaseKeyPath<Root, Value> | ||
public typealias _SendableAnyKeyPath = AnyKeyPath | ||
public typealias _SendablePartialKeyPath<Root> = PartialKeyPath<Root> | ||
public typealias _SendableKeyPath<Root, Value> = KeyPath<Root, Value> | ||
public typealias _SendableWritableKeyPath<Root, Value> = WritableKeyPath<Root, Value> | ||
public typealias _SendableReferenceWritableKeyPath<Root, Value> = ReferenceWritableKeyPath<Root, Value> | ||
public typealias _SendablePartialCaseKeyPath<Root> = PartialCaseKeyPath<Root> | ||
public typealias _SendableCaseKeyPath<Root, Value> = CaseKeyPath<Root, Value> | ||
#endif | ||
|
||
@_transparent | ||
func sendableKeyPath( | ||
_ keyPath: AnyKeyPath | ||
) -> _SendableAnyKeyPath { | ||
unsafeBitCast(keyPath, to: _SendableAnyKeyPath.self) | ||
Check warning on line 26 in Sources/ComposableArchitecture/Internal/KeyPath+Sendable.swift GitHub Actions / xcodebuild (IOS, 15.2)
Check warning on line 26 in Sources/ComposableArchitecture/Internal/KeyPath+Sendable.swift GitHub Actions / xcodebuild (MACOS, 15.2)
Check warning on line 26 in Sources/ComposableArchitecture/Internal/KeyPath+Sendable.swift GitHub Actions / xcodebuild (test, IOS, 15.4)
Check warning on line 26 in Sources/ComposableArchitecture/Internal/KeyPath+Sendable.swift GitHub Actions / xcodebuild (test, IOS, 15.4)
Check warning on line 26 in Sources/ComposableArchitecture/Internal/KeyPath+Sendable.swift GitHub Actions / xcodebuild (test, IOS, 15.4)
Check warning on line 26 in Sources/ComposableArchitecture/Internal/KeyPath+Sendable.swift GitHub Actions / xcodebuild (test, MAC_CATALYST, 15.4)
Check warning on line 26 in Sources/ComposableArchitecture/Internal/KeyPath+Sendable.swift GitHub Actions / xcodebuild (test, MAC_CATALYST, 15.4)
Check warning on line 26 in Sources/ComposableArchitecture/Internal/KeyPath+Sendable.swift GitHub Actions / xcodebuild (test, MAC_CATALYST, 15.4)
Check warning on line 26 in Sources/ComposableArchitecture/Internal/KeyPath+Sendable.swift GitHub Actions / xcodebuild (test, MACOS, 15.4)
Check warning on line 26 in Sources/ComposableArchitecture/Internal/KeyPath+Sendable.swift GitHub Actions / xcodebuild (test, MACOS, 15.4)
Check warning on line 26 in Sources/ComposableArchitecture/Internal/KeyPath+Sendable.swift GitHub Actions / xcodebuild (test, MACOS, 15.4)
Check warning on line 26 in Sources/ComposableArchitecture/Internal/KeyPath+Sendable.swift GitHub Actions / xcodebuild (test, TVOS, 15.4)
Check warning on line 26 in Sources/ComposableArchitecture/Internal/KeyPath+Sendable.swift GitHub Actions / xcodebuild (test, TVOS, 15.4)
Check warning on line 26 in Sources/ComposableArchitecture/Internal/KeyPath+Sendable.swift GitHub Actions / xcodebuild (test, TVOS, 15.4)
Check warning on line 26 in Sources/ComposableArchitecture/Internal/KeyPath+Sendable.swift GitHub Actions / xcodebuild (test, VISIONOS, 15.4)
Check warning on line 26 in Sources/ComposableArchitecture/Internal/KeyPath+Sendable.swift GitHub Actions / xcodebuild (test, VISIONOS, 15.4)
Check warning on line 26 in Sources/ComposableArchitecture/Internal/KeyPath+Sendable.swift GitHub Actions / xcodebuild (test, VISIONOS, 15.4)
Check warning on line 26 in Sources/ComposableArchitecture/Internal/KeyPath+Sendable.swift GitHub Actions / xcodebuild (test, WATCHOS, 15.4)
Check warning on line 26 in Sources/ComposableArchitecture/Internal/KeyPath+Sendable.swift GitHub Actions / xcodebuild (test, WATCHOS, 15.4)
Check warning on line 26 in Sources/ComposableArchitecture/Internal/KeyPath+Sendable.swift GitHub Actions / xcodebuild (test, WATCHOS, 15.4)
|
||
} |