Jérémy Touati
08/05/2019, 5:36 AMopen class SuperClass {
override operator fun equals(other: Any?): Boolean {
return super.equals(other)
}
}
class ExtendedClass : SuperClass() {
override operator fun equals(other: Any?): Boolean {
return super.equals(other)
}
}
Error:(9, 14) Kotlin: 'operator' modifier is inapplicable on this function: must override ''equals()'' in Anyso apparently this doesn't compile unless I remove the
operator
keyword from `ExtendedClass`' implementation
is this intended behavior? this seems... a bit weird and unintuitive to mekarelpeeters
08/05/2019, 7:06 AMJérémy Touati
08/05/2019, 8:19 AMkarelpeeters
08/05/2019, 8:20 AMJérémy Touati
08/05/2019, 8:34 AM