Boxed properties should be replaced with unboxed
Reports boxed Range.start
and Range.endInclusive
properties.
These properties can be replaced with unboxed first
and last
properties to avoid redundant calls.
The quick-fix replaces start
and endInclusive
properties with the corresponding first
and last
.
Example:
fun foo(range: CharRange) {
val lastElement = range.endInclusive
}
After the quick-fix is applied:
fun foo(range: CharRange) {
val lastElement = range.last
}
Inspection Details | |
---|---|
Available in: | IntelliJ IDEA 2023.3, Qodana for JVM 2023.3 |
Plugin: | Kotlin, @snapshot@ |
Last modified: 13 July 2023