@@ -43,7 +43,7 @@ extension ABI {
4343 }
4444
4545 /// The current supported ABI version (ignoring any experimental versions.)
46- typealias CurrentVersion = v0
46+ typealias CurrentVersion = v6_3
4747
4848 /// The highest defined and supported ABI version (including any experimental
4949 /// versions.)
@@ -55,10 +55,18 @@ extension ABI {
5555 /// - Parameters:
5656 /// - versionNumber: The ABI version number for which a concrete type is
5757 /// needed.
58+ /// - swiftCompilerVersion: The version number of the Swift compiler. This
59+ /// is used when `versionNumber` is greater than the highest known version
60+ /// to determine whether a version type can be returned. The default value
61+ /// is the version of the Swift compiler which was used to build the
62+ /// testing library.
5863 ///
5964 /// - Returns: A type conforming to ``ABI/Version`` that represents the given
6065 /// ABI version, or `nil` if no such type exists.
61- static func version( forVersionNumber versionNumber: VersionNumber = ABI . CurrentVersion. versionNumber) -> ( any Version . Type ) ? {
66+ static func version(
67+ forVersionNumber versionNumber: VersionNumber ,
68+ givenSwiftCompilerVersion swiftCompilerVersion: @autoclosure ( ) -> VersionNumber = swiftCompilerVersion
69+ ) -> ( any Version . Type ) ? {
6270 if versionNumber > ABI . HighestVersion. versionNumber {
6371 // If the caller requested an ABI version higher than the current Swift
6472 // compiler version and it's not an ABI version we've explicitly defined,
@@ -71,7 +79,7 @@ extension ABI {
7179 // Note also that building an old version of Swift Testing with a newer
7280 // compiler may produce incorrect results here. We don't generally support
7381 // that configuration though.
74- if versionNumber > swiftCompilerVersion {
82+ if versionNumber > swiftCompilerVersion ( ) {
7583 return nil
7684 }
7785 }
0 commit comments