


We will soon prohibit non-exhaustive when statements to make the behavior consistent with when expressions. It covers all possible cases, making your code safer. Stable exhaustive when statements for enum, sealed, and Boolean subjectsĪn exhaustive when statement contains branches for all possible types or values of its subject, or for some types plus an else branch. Support for annotations on class type parameters Improved type inference for recursive generic types It also includes various type inference improvements and support for annotations on class type parameters: Stable instantiation of annotation classes Stable suspending functions as supertypes Stable exhaustive when statements for enum, sealed and Boolean subjects Kotlin 1.6.0 brings stabilization to several language features introduced for preview in the previous 1.5.30 release: You can also find an overview of the changes in the release blog post. Kotlin 1.6.0 introduces new language features, optimizations and improvements to existing features, and a lot of improvements to the Kotlin standard library.
