holgerbrandl
06/01/2025, 8:31 PMdata class Foo(val id: String) {
override fun toString(): String = id
}
class Bar(val id: String)
class Test
class Test2
fun main() {
val foo = Foo("1")
val bar = Bar("2")
// why is not flagged as well?
if(foo != bar) println("not equal")
if(Test() != Test2()) println("not equal")
}
The first condition is not flagged. The issues seems to affect only cases where the left-hand side argument of != is a data class.CLOVIS
06/02/2025, 8:14 AMholgerbrandl
06/02/2025, 8:31 AM