<Kotlin reify is not getting the actual instance t...
# stackoverflow
r
Kotlin reify is not getting the actual instance type I'm trying to implement a ValueObject base class using Kotlin and DDD. As any value object must consider all attributes in the equals method, I decided to implement a single method using reflection, so no subclass will need to implement it. My ValueObject class is as follows: abstract class ValueObject { override fun equals(other: Any?) = when { this === other -> true other !is ValueObject -> false else -> deepEquals(other) } inline fun deepEquals(other:...