Files
kotlin-fork/idea/testData/inspections/replaceCallWithComparison/test.kt
T
Mikhail Glukhikh 475dc6541b Replace call with comparison inspection introduced #KT-11425 Fixed
(cherry picked from commit 042fc0d)
2016-08-01 12:24:14 +03:00

10 lines
257 B
Kotlin
Vendored

fun foo() {
1.equals(1) // YES
!1.equals(2) // YES
1.compareTo(1) // NO
1.compareTo(1) == 0 // NO
2.compareTo(1) > 0 // YES
0 >= 1.compareTo(2) // YES
2.plus(2) // NO
2.times(2) // NO
}