-
Notifications
You must be signed in to change notification settings - Fork 594
Open
Description
When using repeated fields, wire generates this code:
var floats: MutableList<Float>? = null
val unknownFields = reader.forEachTag { tag ->
when (tag) {
1 -> {
if (floats == null) {
val minimumByteSize = 4
val initialCapacity = (reader.nextFieldMinLengthInBytes() / minimumByteSize)
.coerceAtMost(Int.MAX_VALUE.toLong())
.toInt()
floats = ArrayList(initialCapacity)
}
floats!!.add(ProtoAdapter.FLOAT.decode(reader))
}
}With kotlin 2.3, this leads to a warning because floats is proven to be non null.
Metadata
Metadata
Assignees
Labels
No labels