Skip to content

Commit 18274b1

Browse files
Merge pull request #330 from ebariaux/main
Support Embedded Swift
2 parents be0d7c6 + 8940089 commit 18274b1

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

Sources/ComplexModule/Complex+Codable.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
import RealModule
1313

1414
// FloatingPoint does not refine Codable, so this is a conditional conformance.
15+
#if compiler(>=6.0)
16+
@_unavailableInEmbedded
17+
#endif
1518
extension Complex: Decodable where RealType: Decodable {
1619
public init(from decoder: Decoder) throws {
1720
var unkeyedContainer = try decoder.unkeyedContainer()
@@ -21,6 +24,9 @@ extension Complex: Decodable where RealType: Decodable {
2124
}
2225
}
2326

27+
#if compiler(>=6.0)
28+
@_unavailableInEmbedded
29+
#endif
2430
extension Complex: Encodable where RealType: Encodable {
2531
public func encode(to encoder: Encoder) throws {
2632
var unkeyedContainer = encoder.unkeyedContainer()

Sources/ComplexModule/Complex+StringConvertible.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ extension Complex: CustomStringConvertible {
1616
}
1717
}
1818

19+
#if compiler(>=6.0)
20+
@_unavailableInEmbedded
21+
#endif
1922
extension Complex: CustomDebugStringConvertible {
2023
public var debugDescription: String {
2124
"Complex<\(RealType.self)>(\(String(reflecting: x)), \(String(reflecting: y)))"

0 commit comments

Comments
 (0)