@@ -389,9 +389,10 @@ extension LLVMJSONDecoding.KeyedContainer: KeyedDecodingContainerProtocol {
389
389
return try decode ( type, forKey: key)
390
390
}
391
391
392
- func nestedContainer< NestedKey> ( keyedBy type: NestedKey . Type , forKey key: Key ) throws -> KeyedDecodingContainer <
393
- NestedKey
394
- > where NestedKey: CodingKey {
392
+ func nestedContainer< NestedKey: CodingKey > (
393
+ keyedBy type: NestedKey . Type ,
394
+ forKey key: Key
395
+ ) throws -> KeyedDecodingContainer < NestedKey > {
395
396
var objectPtr : UnsafeMutableRawPointer ? = nil
396
397
if JSON_value_getAsObject ( try _getValueOrThrow ( forKey: key) , & objectPtr) {
397
398
throw _typeMismatchError ( KeyedDecodingContainer< NestedKey> . self , forKey: key)
@@ -533,8 +534,9 @@ extension LLVMJSONDecoding.UnkeyedContainer: UnkeyedDecodingContainer {
533
534
)
534
535
}
535
536
536
- mutating func nestedContainer< NestedKey> ( keyedBy type: NestedKey . Type ) throws -> KeyedDecodingContainer < NestedKey >
537
- where NestedKey: CodingKey {
537
+ mutating func nestedContainer< NestedKey: CodingKey > (
538
+ keyedBy type: NestedKey . Type
539
+ ) throws -> KeyedDecodingContainer < NestedKey > {
538
540
var objectPtr : UnsafeMutableRawPointer ? = nil
539
541
let newPath = codingPath + [ IndexKey ( intValue: currentIndex) ]
540
542
if JSON_value_getAsObject ( try _getValueOrThrow ( ) , & objectPtr) {
@@ -672,9 +674,10 @@ extension LLVMJSONEncoding.KeyedContainer: KeyedEncodingContainerProtocol {
672
674
try value. encode ( to: encoder)
673
675
}
674
676
675
- mutating func nestedContainer< NestedKey> ( keyedBy keyType: NestedKey . Type , forKey key: Key ) -> KeyedEncodingContainer <
676
- NestedKey
677
- > where NestedKey: CodingKey {
677
+ mutating func nestedContainer< NestedKey: CodingKey > (
678
+ keyedBy keyType: NestedKey . Type ,
679
+ forKey key: Key
680
+ ) -> KeyedEncodingContainer < NestedKey > {
678
681
let nestedObjectPtr = JSON_object_setNewObject ( objectPtr, key. stringValue)
679
682
return KeyedEncodingContainer ( KeyedContainer ( objectPtr: nestedObjectPtr, codingPath: codingPath + [ key] ) )
680
683
}
0 commit comments