Minor, fix warnings on new stdlib API

In modules where allWarningsAsErrors is not yet enabled.
This commit is contained in:
Alexander Udalov
2021-04-09 17:20:07 +02:00
parent e89ab71bf8
commit 168d8b07a8
8 changed files with 14 additions and 14 deletions
@@ -37,7 +37,7 @@ fun ProtoBuf.Annotation.Argument.Value.readAnnotationArgument(strings: NameResol
return when (type) {
BYTE -> KmAnnotationArgument.ByteValue(intValue.toByte())
CHAR -> KmAnnotationArgument.CharValue(intValue.toChar())
CHAR -> KmAnnotationArgument.CharValue(intValue.toInt().toChar())
SHORT -> KmAnnotationArgument.ShortValue(intValue.toShort())
INT -> KmAnnotationArgument.IntValue(intValue.toInt())
LONG -> KmAnnotationArgument.LongValue(intValue)
@@ -34,7 +34,7 @@ fun KmAnnotationArgument.writeAnnotationArgument(strings: StringTable): ProtoBuf
}
is KmAnnotationArgument.CharValue -> {
this.type = ProtoBuf.Annotation.Argument.Value.Type.CHAR
this.intValue = value.toLong()
this.intValue = value.code.toLong()
}
is KmAnnotationArgument.ShortValue -> {
this.type = ProtoBuf.Annotation.Argument.Value.Type.SHORT