@@ -93,8 +93,11 @@ extension Button: ToolbarItem {
9393 }
9494}
9595
96- @available ( iOS 14 , macCatalyst 14 , tvOS 14 , * )
97- @available ( tvOS, unavailable)
96+ // Despite the fact that this is unavailable on tvOS, the `introduced: 14`
97+ // clause is required for all current Swift versions to accept it.
98+ // See https://forums.swift.org/t/contradictory-available-s-are-required/78831
99+ @available ( iOS 14 , macCatalyst 14 , * )
100+ @available ( tvOS, unavailable, introduced: 14 )
98101extension Spacer : ToolbarItem {
99102 public func createBarButtonItem( ) -> UIBarButtonItem {
100103 if let minLength, minLength > 0 {
@@ -136,8 +139,8 @@ struct FixedWidthToolbarItem<Base: ToolbarItem>: ToolbarItem {
136139}
137140
138141// Setting width on a flexible space is ignored, you must use a fixed space from the outset
139- @available ( iOS 14 , macCatalyst 14 , tvOS 14 , * )
140- @available ( tvOS, unavailable)
142+ @available ( iOS 14 , macCatalyst 14 , * )
143+ @available ( tvOS, unavailable, introduced : 14 )
141144struct FixedWidthSpacerItem : ToolbarItem {
142145 var width : Int ?
143146
0 commit comments