``` open class SuperClass { override operator ...
# getting-started
j
Copy code
open 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 Any
so 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 me
k
That's weird, I'd report this as a bug on YouTrack.
j
sure, will do, thanks
k
(and link it here, now I'm interested as well)
j