Skip to content

Commit 946cbe8

Browse files
committed
Hm, why aren’t we detecting the broken stdlib on CI?
1 parent 541bd53 commit 946cbe8

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

Sources/_CollectionsUtilities/Array+WithContiguousStorage Compatibility.swift

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ extension Array {
2121
// SR-14663 only triggers on array values that are verbatim bridged
2222
// from Objective-C, so it cannot ever trigger for element types
2323
// that aren't verbatim bridged.
24+
print("Not bridged")
2425
return false
2526
}
2627

@@ -33,21 +34,26 @@ extension Array {
3334
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS)
3435
if #available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) {
3536
// The OS is too new to be affected by this bug. (>= 5.5 stdlib)
37+
print("Too new")
3638
return false
3739
}
38-
// guard #available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13, *) else {
39-
// // The OS is too old to be affected by this bug. (< 5.1 stdlib)
40-
// return false
41-
// }
40+
guard #available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13, *) else {
41+
// The OS is too old to be affected by this bug. (< 5.1 stdlib)
42+
print("Too old")
43+
return false
44+
}
45+
print("Affected")
4246
return true
4347
#else
4448
// Assume that other platforms aren't affected.
49+
print("Unknown platform")
4550
return false
4651
#endif
4752

4853
#else
4954
// Platforms that don't have an Objective-C runtime don't have verbatim
5055
// bridged array values, so the bug doesn't apply to them.
56+
print("Non-ObjC platform")
5157
return false
5258
#endif
5359
}

0 commit comments

Comments
 (0)