intellij-community
intellij-community copied to clipboard
KTIJ-20639 "Remove explicit type" breaks code for Long variables
trafficstars
https://youtrack.jetbrains.com/issue/KTIJ-20639
I believe this issue is also true for other numeric types. For example:
val long: Long = 0 // 0 -> 0L
val uLong: ULong = 0u // 0u -> 0uL; 0U -> 0UL
val byte: Byte = 0 // 0 -> 0.toByte()
val short: Short = 0 // 0 -> 0.toShort()
Could you please support these cases as well?
Also, while we're on this issue, please consider case when we have null on RHS:
val long: Long? = null
We could insert cast in this case:
val long = null as Long?
Fixed