Skip to content

Commit 0815b8a

Browse files
Added array literal support
1 parent c190c83 commit 0815b8a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Sources/DynamicCodable/DynamicCodable+Literals.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ extension DynamicCodable: ExpressibleByStringLiteral, ExpressibleByStringInterpo
4141
}
4242
}
4343

44+
extension DynamicCodable: ExpressibleByArrayLiteral {
45+
@inlinable
46+
public init(arrayLiteral elements: DynamicCodable...) {
47+
self = .unkeyed(elements)
48+
}
49+
}
50+
4451

4552
extension DynamicCodable.Key: ExpressibleByIntegerLiteral {
4653
@inlinable

0 commit comments

Comments
 (0)