| Kotlin 2.3 Improves Swift Interop |
| Written by Mike James | |||
| Thursday, 27 November 2025 | |||
|
Kotlin 2.3 is available now as a release candidate. The new version adds a new checker for unused return values, and changes to context-sensitive resolution. The release candidate adds support for Java 25, and improved interop through Swift export. Kotlin is the open source language originated by JetBrains and promoted by Google as a first class language for Android to replace or supplement Java.
This release includes as stable several new language features previously added as beta and experimental versions, including support for nested type aliases, and data-flow-based exhaustiveness checks for when expressions. Features that are now enabled by default include improved overload resolution for lambdas with suspend function types, and support for return statements in expression bodies with explicit return types. Kotlin 2.3.0-RC introduces a new feature, the unused return value checker. This feature warns you when an expression returns a value other than Unit or Nothing and isn't passed to a function, checked in a condition, or used otherwise. You can use it to catch bugs where a function call produces a meaningful result, but the result is silently dropped, which can lead to unexpected behavior or hard-to-trace issues. Swift interoperability has been improved through Swift export, adding support for native enum classes and variadic function parameters. Previously, Kotlin enums were exported as ordinary Swift classes. Now the mapping is direct, and you can use regular native Swift enums. Kotlin's vararg functions are now directly mapped to Swift's variadic function parameters too. Wasm support improvements mean fully qualified names (FQNs) are now enabled by default at runtime. Enabling FQNs by default improves code portability and makes runtime errors more informative by displaying the fully qualified name. Improvements to the Gradle support mean Kotlin 2.3.0-RC is fully compatible with Gradle 7.6.3 through 9.0.0. There's also a new API for registering generated sources in Gradle projects. This helps IDEs distinguish between generated code and regular source files. The API allows IDEs to highlight the generated code differently in the UI and trigger generation tasks when the project is imported. The developers say the API is also especially useful for third-party plugins or tools that generate code, such as KSP (Kotlin Symbol Processing). Kotlin 2.3 is available as a release candidate now. The final release is due to be available as a stable release next month. Developers can access Kotlin 2.3.0-RC on GitHub.
More InformationRelated ArticlesJetBrains Previews VSCode Kotlin At KotlinConf Kotlin 2.1.20 Boosts Plugin Support Kotlin 2 Released With Multiplatform K2 Compiler Why Do Android Devs Convert To Kotlin? To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.
Comments
or email your comment to: comments@i-programmer.info <ASIN:B0CK3X93KF> |
|||
| Last Updated ( Thursday, 27 November 2025 ) |


