Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Commit dc411f0

Browse files
committed
fix(cufyorg-PED-bson): wierd kotlin compiler issue
1 parent 000a334 commit dc411f0

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

cufyorg-PED-bson/src/commonMain/kotlin/Extensions.kt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,12 @@ inline operator fun <I> Codec<I, BsonDocument>.invoke(block: BsonDocumentBlock):
5454
operator fun <I> BsonDocumentLike.get(codec: FieldCodec<I, out BsonElement>): I {
5555
return this[codec.name] decodeAny codec
5656
}
57+
58+
/**
59+
* Get the value of the field with the name of the
60+
* given [codec] and decode it using the given [codec].
61+
*/
62+
// DO NOT REMOVE! fixes wierd kotlin compiler issue
63+
operator fun <I> BsonDocumentLike.get(codec: BsonFieldCodec<I, out BsonElement>): I {
64+
return this[codec.name] decodeAny codec
65+
}

0 commit comments

Comments
 (0)