Comparing field of enum to another enum value


In Android Studio this does not produce any warning:

class Stuff {

var field: EnumA = EnumA.OTHER_STUFF

fun isState() = field == EnumB.OTHER_STUFF


I understand that this is because == is actually using equals. But still, 99,9999% of the cases the user does not want to make this comparison. In Java we have a lint warning (when using equals() like this)
Just had a nasty bug due to this, very hard to see… Spent some time on it :sweat_smile: