I noticed that some methods (such as `toString()` ...
# kontributors
s
I noticed that some methods (such as
toString()
and
hashCode()
) are marked as
isFakeOverride = true
, which makes me wonder what the semantics/purpose of this property?
u
“Fake override” is a special method created by the compiler when some method in a base class is not explicitly overridden in the derived class.
Copy code
open class A {
    fun foo() {}
}

class B : A() {
    // "fake override" for fun foo
}
🙏 1
today i learned 1
m
In the example above, shouldn't `foo`be
open
? Or do final methods count too?
u
Fake overrides are constructed both for open and final methods
👍 1