Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Sources/ComplexModule/Complex+Codable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
import RealModule

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

#if compiler(>=6.0)
@_unavailableInEmbedded
#endif
extension Complex: Encodable where RealType: Encodable {
public func encode(to encoder: Encoder) throws {
var unkeyedContainer = encoder.unkeyedContainer()
Expand Down
3 changes: 3 additions & 0 deletions Sources/ComplexModule/Complex+StringConvertible.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ extension Complex: CustomStringConvertible {
}
}

#if compiler(>=6.0)
@_unavailableInEmbedded
#endif
extension Complex: CustomDebugStringConvertible {
public var debugDescription: String {
"Complex<\(RealType.self)>(\(String(reflecting: x)), \(String(reflecting: y)))"
Expand Down