`Any.kt` is weird. it doesn't actually compile, (a...
# language-proposals
g
Any.kt
is weird. it doesn't actually compile, (an open class with open methods without implementation, it's not an abstract class). which is OK because its a surrogate for Object.java ofc, but still, I feel like source code included with the distribution should compile on the face of it. can I propose changing it to:
Copy code
public open class Any{
  public open operator fun equals(other: Any?): Boolean = this === other;
  public open fun hashCode(): Int = this.identityHashCode

  public open fun toString(): String = this.javaClass.canonicalName + "@" + identityHashCode
}
along with the available extension property (maybe also in Any.kt or Standard.kt?)
Copy code
val Any.identityHashCode: Int get() = System.identityHashCode(this);
needless to say this code will never actually be compiled, but still, to somebody reading that file it wont lead them astray.