Skip to content

Commit 9da34d2

Browse files
committed
Only use @Frozen in 5.1+
Not available in 5.0, breaks build.
1 parent 7029064 commit 9da34d2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Sources/MacroXmlRpc/ValueType.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import protocol XmlRpc.XmlRpcValueRepresentable
1010

1111
public extension XmlRpc.Value {
1212

13+
#if swift(>=5.1)
1314
/**
1415
* The various possible XML-RPC value types used in XML-RPC introspection.
1516
* Note that those are flat, i.e. arrays and dictionaries are not further
@@ -21,6 +22,13 @@ public extension XmlRpc.Value {
2122
case string, bool, int, double, dateTime, data
2223
case array, dictionary
2324
}
25+
#else
26+
enum ValueType: Hashable {
27+
case null
28+
case string, bool, int, double, dateTime, data
29+
case array, dictionary
30+
}
31+
#endif
2432

2533
@inlinable
2634
var xmlRpcValueType: ValueType {

0 commit comments

Comments
 (0)