Skip to content

Commit e536ed4

Browse files
committed
Fix compilation on Swift <5.5 on Darwin platforms
1 parent 8428fb0 commit e536ed4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Sources/NSLock+withLock.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if (!canImport(Darwin) && swift(<6.0)) || swift(<5.7)
1+
#if swift(<5.7) || (!canImport(Darwin) && swift(<6.0))
22
import Foundation
33

44

Tests/JSONLoggerTests/JSONLoggerTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ final class JSONLoggerTests : XCTestCase {
1212
public static let defaultJSONDecoder: JSONDecoder = {
1313
let res = JSONDecoder()
1414
if #available(macOS 12.0, tvOS 15.0, iOS 15.0, watchOS 8.0, *) {
15-
#if canImport(Darwin) || compiler(>=6)
15+
#if (canImport(Darwin) && swift(>=5.5)) || swift(>=6)
1616
res.allowsJSON5 = false
1717
#endif
1818
}
@@ -31,7 +31,7 @@ final class JSONLoggerTests : XCTestCase {
3131
}
3232
res.dataDecodingStrategy = .base64
3333
if #available(macOS 12.0, tvOS 15.0, iOS 15.0, watchOS 8.0, *) {
34-
#if canImport(Darwin) || compiler(>=6)
34+
#if (canImport(Darwin) && swift(>=5.5)) || swift(>=6)
3535
res.assumesTopLevelDictionary = false
3636
#endif
3737
}

0 commit comments

Comments
 (0)