From 54b85580910321c35fc33606672d7074e34669ba Mon Sep 17 00:00:00 2001 From: Stephen Canon Date: Fri, 20 Nov 2020 11:44:06 -0500 Subject: [PATCH 1/2] Partially revert Float16 availability changes Specifically, when building for macOS/x86_64, use the old availability annotation instead of marking Float16 unconditionally unavailable to give downstream clients a window to adjust their own annotations. --- stdlib/public/core/FloatingPointTypes.swift.gyb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/stdlib/public/core/FloatingPointTypes.swift.gyb b/stdlib/public/core/FloatingPointTypes.swift.gyb index ac7ec998e675d..4dd57a9bb3d45 100644 --- a/stdlib/public/core/FloatingPointTypes.swift.gyb +++ b/stdlib/public/core/FloatingPointTypes.swift.gyb @@ -1352,7 +1352,13 @@ internal struct _${Self}AnyHashableBox: _AnyHashableBox { ${SelfDocComment} @frozen +% if bits == 16: +@available(iOS 14, tvOS 14, watchOS 7, *) +@available(OSX, unavailable) +@available(macCatalyst, unavailable) +% else: @available(*, unavailable, message: "${Self} is not available on target platform.") +% end public struct ${Self} { /// Creates a value initialized to zero. @_transparent From 19a6e04c42329ce128985ec172a77d2bde057fca Mon Sep 17 00:00:00 2001 From: Stephen Canon Date: Mon, 23 Nov 2020 14:03:36 -0500 Subject: [PATCH 2/2] Update stdlib/public/core/FloatingPointTypes.swift.gyb Co-authored-by: Xiaodi Wu <13952+xwu@users.noreply.github.com> --- stdlib/public/core/FloatingPointTypes.swift.gyb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/public/core/FloatingPointTypes.swift.gyb b/stdlib/public/core/FloatingPointTypes.swift.gyb index 4dd57a9bb3d45..eee9b652f3c6f 100644 --- a/stdlib/public/core/FloatingPointTypes.swift.gyb +++ b/stdlib/public/core/FloatingPointTypes.swift.gyb @@ -1354,7 +1354,7 @@ ${SelfDocComment} @frozen % if bits == 16: @available(iOS 14, tvOS 14, watchOS 7, *) -@available(OSX, unavailable) +@available(macOS, unavailable) @available(macCatalyst, unavailable) % else: @available(*, unavailable, message: "${Self} is not available on target platform.")