This is a duplicate of How do I constrain a Kotlin extension function parameter to be the same as the extended type?. The workaround presented there would look like this for your case:
val <T> T.shouldBe: (T) -> Boolean get() = { this == it }