Leveling up Kotlin: What’s New in 2.2

Wed, 16 Jul 2025 09:13:00 +0000
Kotlin, Programming Languages, KotlinServerSide

With every new Kotlin release, the changelog tends to mix two types of updates: the quiet, incremental improvements you barely notice and those that actually affect your daily work. Kotlin 2.2 fits exactly into that pattern. If you’ve been following the language evolution closely or read our previous Kotlin 2.1 overview you probably remember features like non-local returns or improved string interpolation arriving in preview mode. With Kotlin 2.2, some of those features finally graduated to stable, alongside a few new additions to the language and compiler. Others, like context parameters, are experimental but worth a look, especially if you’re building libraries, DSLs, or experimenting with more advanced Kotlin features.

This short overview will focus on exactly those changes likely to matter for real-world Kotlin projects - no hype, no theoretical language design debates, just the practical stuff.

For whom is this blog post?

This article is for developers who use Kotlin daily (whether you write backend services, or build libraries), or experiment with Kotlin in their side projects.

If you’re wondering:

Which Kotlin 2.2 features are stable and ready for production?

What’s new in the language itself, not just in tooling?

Which features might affect how you write or structure your Kotlin code?

Then this post should answer those questions without going too deep into compiler internals or language design philosophy. If you’re completely new to Kotlin, you might want to start elsewhere - we’ll skip over basic syntax explanations and focus on what’s new compared to Kotlin 2.1. And if you come from a different background, for example, Java, and you’re curious why Kotlin might be worth a look in the first place, you can check our guide comparing Kotlin and Java.

Prerequisites

Before jumping into the list of features, it’s worth clarifying what’s stable and what still requires an explicit opt-in. Some of the language features introduced in Kotlin 2.2 are finally stable and production-ready. Others, especially experimental ones like context parameters, still require enabling them via compiler options. To experiment with these features, ensure your build is configured correctly.

For example, when using Gradle:

// build.gradle.kts

kotlin {
   compilerOptions {
       freeCompilerArgs.add("-Xcontext-parameters")
   }
}

The exact feature name to use depends on the specific experimental feature you’re trying out and it will be pointed out in the relevant sections. So let’s start with what’s finally stable.

Graduated from experimental: what’s stable in Kotlin 2.2

Some language features introduced in previous Kotlin releases started as experimental, meaning they were available for testing but not guaranteed to stay unchanged. With Kotlin 2.2, a few of them finally reached stable status, which means they’re ready for production use and no longer require special compiler flags.

Here’s a quick overview of what graduated to stable in Kotlin 2.2.

Smarter default methods on the JVM

If you’re building Kotlin projects targeting the JVM, Kotlin 2.2 introduces a subtle but significant change in how default method implementations in interfaces are handled. It can affect both your bytecode and binary compatibility. Starting with...