Inline Tiny Types With Validation

I’ve been trying to find a way to perform validation on inline classes. The language designers really don’t want to allow this, as it would make Java interop unsafe in some circumstances.

If you have a pure Kotlin codebase that’s a shame. So I present a hack to get validated inline tiny types in Kotlin.

submitted by /u/dmcg
[link] [comments]