JetBrains has released Kotlin 1.6.20, a new release of the Kotlin language that features better interoperability with generic Java classes as well as faster build times. Some features cited in the release are still in preview form.
Improved interoperability with generic Java classes and interfaces was enabled through the inclusion of definitely non-nullable types, a feature currently in a beta stage. Kotlin 1.6.20 allows developers to mark a generic type parameter as definitely non-nullable using the new syntax,
T & Any.
Kotlin 1.6.20 was released April 3. Installation instructions can be found on the Kotlin website. Other capabilities in Kotlin 1.6.20 include the following:
- Kotlin/Native performance has been improved via updates and bug fixes to the LLVM IR generated by Kotlin.
- Hierarchical structure support for multiplatform projects is enabled by default. This capability, introduced in Kotlin 1.4.0 in August 2020, improves code sharing in a project.
- A prototype of context receivers for Kotlin/JVM offers new support for defining context-dependent declarations.
Copyright © 2022 IDG Communications, Inc.