If I create a new class that only inherits from `A...
# stdlib
m
If I create a new class that only inherits from
Any
, what is the default
equals()
implementation, given I don’t override it myself? The source code for
Any
doesn’t show what the default is
Copy code
public open operator fun equals(other: Any?): Boolean
j
Instance equality
👌 1
Its equivalent of doing ===
m
Thanks, is that documented anywhere?
f
It's inherited from Java and Java has it specified in the specs.
👍 1
j
Kotlin has two other platforms though. It needs to be defined by Kotlin.
3