Skip to content

Commit 3bda241

Browse files
committed
State CodingKeys as an explicit requirement
The presence of this attribute will be used to guide the protocol derivation machinery to synthesize CodingKeys.
1 parent 785bda0 commit 3bda241

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

stdlib/public/core/Codable.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
//===----------------------------------------------------------------------===//
1616

1717
/// A type that can encode itself to an external representation.
18+
@_implicitly_synthesizes_nested_requirement("CodingKeys")
1819
public protocol Encodable {
1920
/// Encodes this value into the given encoder.
2021
///
@@ -29,6 +30,7 @@ public protocol Encodable {
2930
}
3031

3132
/// A type that can decode itself from an external representation.
33+
@_implicitly_synthesizes_nested_requirement("CodingKeys")
3234
public protocol Decodable {
3335
/// Creates a new instance by decoding from the given decoder.
3436
///

0 commit comments

Comments
 (0)