Skip to content

Commit 23801e4

Browse files
authored
Don't compile symbols for Linux that are not yet available (#22)
1 parent dee5a3a commit 23801e4

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Sources/CustomDump/Conformances/Foundation.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ import Foundation
55
#endif
66

77
// NB: Xcode 13 does not include macOS 12 SDK
8-
#if compiler(>=5.5) && !os(macOS) && !targetEnvironment(macCatalyst)
8+
// NB: Swift 5.5 does not include AttributedString in Linux (yet)
9+
#if compiler(>=5.5) && !os(macOS) && !targetEnvironment(macCatalyst) && !os(Linux)
910
@available(iOS 15, macOS 12, tvOS 15, watchOS 8, *)
1011
extension AttributedString: CustomDumpRepresentable {
1112
public var customDumpValue: Any {

Tests/CustomDumpTests/DumpTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ final class DumpTests: XCTestCase {
724724
func testFoundation() {
725725
var dump = ""
726726

727-
#if compiler(>=5.5) && !os(macOS)
727+
#if compiler(>=5.5) && !os(macOS) && !os(Linux)
728728
if #available(iOS 15, macOS 12, tvOS 15, watchOS 8, *) {
729729
dump = ""
730730
customDump(

0 commit comments

Comments
 (0)