Skip to content

Commit cbb24a6

Browse files
committed
Fix compiler crash
1 parent a82d95b commit cbb24a6

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Sources/OpenGraphShims/Attribute+Debug.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// Attribute+Debug.swift
33
// OpenGraphShims
44

5+
#if canImport(Darwin) && DEBUG // Compiler crash for Darwin + release and non-Darwin build
6+
57
// Use 4 spaces instead of \t for bettern test case expect
68
private let tab = " "
79

@@ -85,4 +87,5 @@ extension AnyAttribute: Swift.CustomDebugStringConvertible {
8587

8688
return "\(nextTabs)\(bodyValueString)"
8789
}
88-
}
90+
}
91+
#endif

Tests/OpenGraphShimsTests/Attribute+DebugTests.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// Attribute+DebugTests.swift
33
// OpenGraphShimsTests
44

5+
#if canImport(Darwin) && DEBUG
6+
57
import Testing
68
import OpenGraphShims
79

@@ -48,3 +50,4 @@ struct Attribute_DebugTests {
4850
"""#)
4951
}
5052
}
53+
#endif

0 commit comments

Comments
 (0)