'to' call should be replaced with infix form
Reports to
function calls that can be replaced with the infix form.
Using the infix form makes your code simpler.
The quick-fix replaces to
with the infix form.
Example:
fun foo(a: Int, b: Int) {
val pair = a.to(b)
}
After the quick-fix is applied:
fun foo(a: Int, b: Int) {
val pair = a to b
}
Inspection Details | |
---|---|
Available in: | IntelliJ IDEA 2023.3, Qodana for JVM 2023.3 |
Plugin: | Kotlin, @snapshot@ |
Last modified: 13 July 2023