Skip to content

Commit cb67f45

Browse files
committed
[stdlib] Float16: Add explicit Sendable conformance to work around swiftinterface issue
1 parent ec7258e commit cb67f45

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

stdlib/public/core/FloatingPointTypes.swift.gyb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1370,6 +1370,17 @@ public struct ${Self} {
13701370
}
13711371
}
13721372

1373+
% if bits == 16:
1374+
// This is a workaround for a compiler bug that omits the macOS 11 availability
1375+
// from the implicit conformance emitted into the generated .swiftinterface
1376+
// file. See https://github.com/apple/swift/pull/36669 for details.
1377+
// FIXME: rdar://76092800
1378+
@available(macOS 11, iOS 14, tvOS 14, watchOS 7, *)
1379+
@available(macOS, unavailable)
1380+
@available(macCatalyst, unavailable)
1381+
extension ${Self}: Sendable { }
1382+
% end
1383+
13731384
#endif
13741385
% end
13751386
% end # for bits in all_floating_point_types

0 commit comments

Comments
 (0)