Skip to content

Commit aef50ab

Browse files
authored
Merge pull request #33919 from xymus/fix-availability-float16
[stdlib] Align availability of a Float16 initializer with its type
2 parents 99147a8 + a4bf738 commit aef50ab

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

stdlib/public/core/FloatingPointParsing.swift.gyb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,13 @@ extension ${Self}: LosslessStringConvertible {
166166
// In particular, we still have to export
167167
// _swift_stdlib_strtoXYZ_clocale()
168168
// as ABI to support old compiled code that still requires it.
169+
%if bits == 16:
170+
@available(iOS 14.0, watchOS 7.0, tvOS 14.0, *)
171+
@available(macOS, unavailable)
172+
@available(macCatalyst, unavailable)
173+
%else:
169174
@available(macOS 10.16, iOS 14.0, watchOS 7.0, tvOS 14.0, *)
175+
%end
170176
public init?(_ text: Substring) {
171177
self = 0.0
172178
let success = withUnsafeMutablePointer(to: &self) { p -> Bool in

0 commit comments

Comments
 (0)