Hullaballoonatic
12/01/2019, 10:26 PMiterface Foo : ComparableBar {
override fun equals(other: Any?) = when (other) {
is Comparable* -> // other is ComparableBar && (other as ComparableBar).compareTo(this) == 0
else -> false
}
}
cast as and try/catch?Dominaezzz
12/01/2019, 10:31 PMis Foo ? 😛karelpeeters
12/01/2019, 10:31 PMkarelpeeters
12/01/2019, 10:32 PMequals implementation there.Hullaballoonatic
12/01/2019, 10:32 PMHullaballoonatic
12/01/2019, 10:33 PMFoo isn't the only thing implementing Comparable<Bar>Dominaezzz
12/01/2019, 10:36 PM