Skip to content

Commit ec7258e

Browse files
committed
[stdlib] Fix incorrect Float16 extension
This extension (introduced in #35264) was placed in a file location where it wasn’t correctly guarded against mentioning Float16 on macOS/x86_64, so the generated .swiftinterface file included a reference to an unavailable declaration. (The dummy stand-in Float16 type that we currently use on Intel macOS.) Moving the declaration out of the “AnyHashable” section and into a file region that’s more suitable for it (i.e., enclosed in `#if !((os(macOS) || targetEnvironment(macCatalyst)) && arch(x86_64))`) resolves the issue. rdar://76025365
1 parent 757f55f commit ec7258e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

stdlib/public/core/FloatingPointTypes.swift.gyb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,6 +1019,9 @@ extension ${Self} {
10191019
}
10201020
}
10211021

1022+
${Availability(bits)}
1023+
extension ${Self}: Sendable { }
1024+
10221025
//===----------------------------------------------------------------------===//
10231026
// Explicit conversions between types.
10241027
//===----------------------------------------------------------------------===//
@@ -1343,9 +1346,6 @@ internal struct _${Self}AnyHashableBox: _AnyHashableBox {
13431346
}
13441347
% end
13451348

1346-
${Availability(bits)}
1347-
extension ${Self} : Sendable { }
1348-
13491349
//===----------------------------------------------------------------------===//
13501350
// Deprecated operators
13511351
//===----------------------------------------------------------------------===//

0 commit comments

Comments
 (0)