1313import SwiftShims
1414
1515#if INTERNAL_CHECKS_ENABLED
16- @available ( macOS 12 . 0 , iOS 15 . 0 , watchOS 8 . 0 , tvOS 15 . 0 , * )
16+ // "9999" means: enable if linked with a built library, but not when linked with
17+ // the OS libraries.
18+ // Note: this must not be changed to a "real" OS version.
19+ @available ( macOS 9999 , iOS 9999 , tvOS 9999 , watchOS 9999 , * )
1720@_silgen_name ( " swift_COWChecksEnabled " )
1821public func _COWChecksEnabled( ) -> Bool
1922#endif
@@ -460,15 +463,21 @@ internal struct _ContiguousArrayBuffer<Element>: _ArrayBufferProtocol {
460463 @_alwaysEmitIntoClient
461464 internal var isImmutable : Bool {
462465 get {
463- if #available( macOS 12 . 0 , iOS 15 . 0 , watchOS 8 . 0 , tvOS 15 . 0 , * ) {
466+ // "9999" means: enable if linked with a built library, but not when
467+ // linked with the OS libraries.
468+ // Note: this must not be changed to a "real" OS version.
469+ if #available( macOS 9999 , iOS 9999 , watchOS 9999 , tvOS 9999 , * ) {
464470 if ( _COWChecksEnabled ( ) ) {
465471 return capacity == 0 || _swift_isImmutableCOWBuffer ( _storage)
466472 }
467473 }
468474 return true
469475 }
470476 nonmutating set {
471- if #available( macOS 12 . 0 , iOS 15 . 0 , watchOS 8 . 0 , tvOS 15 . 0 , * ) {
477+ // "9999" means: enable if linked with a built library, but not when
478+ // linked with the OS libraries.
479+ // Note: this must not be changed to a "real" OS version.
480+ if #available( macOS 9999 , iOS 9999 , watchOS 9999 , tvOS 9999 , * ) {
472481 if ( _COWChecksEnabled ( ) ) {
473482 // Make sure to not modify the empty array singleton (which has a
474483 // capacity of 0).
@@ -489,7 +498,10 @@ internal struct _ContiguousArrayBuffer<Element>: _ArrayBufferProtocol {
489498
490499 @_alwaysEmitIntoClient
491500 internal var isMutable : Bool {
492- if #available( macOS 12 . 0 , iOS 15 . 0 , watchOS 8 . 0 , tvOS 15 . 0 , * ) {
501+ // "9999" means: enable if linked with a built library, but not when
502+ // linked with the OS libraries.
503+ // Note: this must not be changed to a "real" OS version.
504+ if #available( macOS 9999 , iOS 9999 , watchOS 9999 , tvOS 9999 , * ) {
493505 if ( _COWChecksEnabled ( ) ) {
494506 return !_swift_isImmutableCOWBuffer( _storage)
495507 }
0 commit comments