The production version of Kotlin 1.3 is now available and introduces contracts to the type system.
Where to download Kotlin
You can access the Kotlin source code on the project’s GitHub repo.
Current version: What’s new in Kotlin 1.3
Kotlin 1.3’s contracts are an experimental addition meant to enrich the type information available through the function system with additional meanings useful at the call site. A contract lets a function tell the compiler things such as “I affect smart casts this way” or “I execute this lambda exactly once.” The Kotlin standard library already has contracts added to several functions, which work regardless of experimental flags.