I just want to understand little more on how equals() and hashCode() are generated by Kotlin.
Does Kotline default “class Foo” generates equals() and hashCode(), or is it only by when using “data class Foo”?
When Kotlin generates equals() and hashCode(), what implementation does it use? Can you document the pesudo code here?
Also how does Kotlin address the subclass with additional fields concern in regard to equals() and hashCode() implementation? More specifically, I am interested in knowing how Kotlin address the issue that Scala addressed with the “canEqual()” pattern described here: http://www.artima.com/lejava/articles/equality.html