Skip to content

Commit 00d1b71

Browse files
authored
Suppress REDUNDANT_ELSE_IN_WHEN in ProtobufTaggedEncoder.encodeNull() (#2988)
^KT-76635 makes this `when` exhaustive, and without the suppress our aggregate build for the corresponding branch fails.
1 parent 4667a18 commit 00d1b71

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

formats/protobuf/commonMain/src/kotlinx/serialization/protobuf/internal/ProtobufTaggedEncoder.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ internal abstract class ProtobufTaggedEncoder : ProtobufTaggedBase(), Encoder, C
3636

3737
public final override fun encodeNull() {
3838
if (nullableMode != NullableMode.ACCEPTABLE) {
39+
@Suppress("REDUNDANT_ELSE_IN_WHEN")
3940
val message = when (nullableMode) {
4041
NullableMode.OPTIONAL -> "'null' is not supported for optional properties in ProtoBuf"
4142
NullableMode.COLLECTION -> "'null' is not supported as the value of collection types in ProtoBuf"

0 commit comments

Comments
 (0)