Skip to content

Commit d8cbaeb

Browse files
Added explicit availability attribute for each protocol requirement
To fix failing test/api-digester/stability-concurrency-abi.test
1 parent 1b2e031 commit d8cbaeb

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

stdlib/public/Concurrency/AsyncStream.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,9 +477,15 @@ extension AsyncStream.Continuation.YieldResult: Sendable where Element: Sendable
477477

478478
@available(SwiftStdlib 9999, *)
479479
extension AsyncStream.Continuation: Hashable {
480+
@available(SwiftStdlib 9999, *)
480481
public func hash(into hasher: inout Hasher) {
481482
return hasher.combine(ObjectIdentifier(storage))
482483
}
484+
@available(SwiftStdlib 9999, *)
485+
public var hashValue: Int {
486+
return _hashValue(for: self)
487+
}
488+
@available(SwiftStdlib 9999, *)
483489
public static func == (lhs: Self, rhs: Self) -> Bool {
484490
return lhs.storage === rhs.storage
485491
}

stdlib/public/Concurrency/AsyncThrowingStream.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,9 +523,15 @@ extension AsyncThrowingStream.Continuation.YieldResult: Sendable where Element:
523523

524524
@available(SwiftStdlib 9999, *)
525525
extension AsyncThrowingStream.Continuation: Hashable {
526+
@available(SwiftStdlib 9999, *)
526527
public func hash(into hasher: inout Hasher) {
527528
return hasher.combine(ObjectIdentifier(storage))
528529
}
530+
@available(SwiftStdlib 9999, *)
531+
public var hashValue: Int {
532+
return _hashValue(for: self)
533+
}
534+
@available(SwiftStdlib 9999, *)
529535
public static func == (lhs: Self, rhs: Self) -> Bool {
530536
return lhs.storage === rhs.storage
531537
}

0 commit comments

Comments
 (0)