Is this a known (k2) bug? ```data class Foo(val id...
# intellij
h
Is this a known (k2) bug?
Copy code
data 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.
c
You can report it here: kotl.in/issue
h
Done KTIJ-34408 No warning for incompatible types checks in != with LHS argument being data class