Did you know that Kotlin can smart-cast a variable in response to calling your own functions? Well, today we’re going to use Kotlin's experimental Contracts feature to make that happen!
Contracts proposal:
github.com/Kot...
✨ New to Kotlin? Start here: typealias.com/...
... or pick up the new Leanpub Edition! book.typealias...
🚀 I just launched a new email newsletter!
Sign up here: newsletter.typ...
Негізгі бет Smart Casts with Kotlin Contracts
Пікірлер: 67