79816068

Date: 2025-11-10 21:35:57
Score: 0.5
Natty:
Report link

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 }
Reasons:
  • Blacklisted phrase (1): How do I
  • Probably link only (1):
  • Low length (1):
  • Has code block (-0.5):
  • High reputation (-2):
Posted by: tyg