Kotlin type system is smart enough to smart cast our code. In this post we will try to understand how that's possible.
ReadLearn useful annotations that will help you write Kotlin code that plays nicely with Java. Maximise interoperability!
ReadTL;DR: be careful when using SAM conversions with Kotlin
Read