[stdlib] Update WordPair: Comparable conformance (#79606)

This commit is contained in:
Ben Rimmington
2025-02-25 18:17:05 +00:00
committed by GitHub
parent 050c69df17
commit 4bb3cf1496
2 changed files with 6 additions and 6 deletions

View File

@@ -1,8 +1,8 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift Atomics open source project
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2023 Apple Inc. and the Swift project authors
// Copyright (c) 2023-2025 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -183,9 +183,9 @@ extension WordPair: Hashable {
}
}
@available(SwiftStdlib 6.2, *)
@available(SwiftStdlib 6.1, *)
extension WordPair: Comparable {
@available(SwiftStdlib 6.2, *)
@available(SwiftStdlib 6.1, *)
@_alwaysEmitIntoClient
@_transparent
public static func <(lhs: WordPair, rhs: WordPair) -> Bool {

View File

@@ -49,7 +49,7 @@ suite.test("basics") {
} // if #available(SwiftStdlib 6.0, *)
if #available(SwiftStdlib 6.2, *) {
if #available(SwiftStdlib 6.1, *) {
suite.test("comparable") {
let c0 = WordPair(first: 0, second: 0)
let c1 = WordPair(first: 1, second: 0)
@@ -65,6 +65,6 @@ suite.test("comparable") {
expectTrue(c4 < c5)
expectFalse(c5 < c4)
}
} // if #available(SwiftStdlib 6.2, *)
} // if #available(SwiftStdlib 6.1, *)
runAllTests()