Kotlin Help

Compatibility guide for Kotlin 2.3

Keeping the Language Modern and Comfortable Updates are among the fundamental principles in Kotlin Language Design. The former says that constructs which obstruct language evolution should be removed, and the latter says that this removal should be well-communicated beforehand to make code migration as smooth as possible.

While most of the language changes were already announced through other channels, like update changelogs or compiler warnings, this document summarizes them all, providing a complete reference for migration from Kotlin 2.2 to Kotlin 2.3. This document also includes information about tool-related changes.

Basic terms

In this document, we introduce several kinds of compatibility:

  • source: source-incompatible change stops code that used to compile fine (without errors or warnings) from compiling anymore

  • binary: two binary artifacts are said to be binary-compatible if interchanging them doesn't lead to loading or linkage errors

  • behavioral: a change is said to be behavioral-incompatible if the same program demonstrates different behavior before and after applying the change

Remember that those definitions are given only for pure Kotlin. Compatibility of Kotlin code from the other languages perspective (for example, from Java) is out of the scope of this document.

Language

Drop support in -language-version for 1.8 and 1.9

Report upper-bound constraint violation errors for inferred types with typealiases

Prohibit @JvmSerializableLambda annotation on inline and crossinline lambdas

Prohibit delegating a Kotlin interface to a Java class when the generic signatures don't match

Deprecate use of return in expression-bodied functions without explicit return type

Prohibit inheritance from nullable supertypes introduced via typealias

Unify generic signature generation for top-level lambdas and call arguments

Prohibit reified type parameters from being inferred as intersection types

Prohibit exposing less-visible types through type parameter bounds

Standard library

Deprecate Char-to-number conversions and introduce explicit digit and code APIs

Deprecate Number.toChar() function

Deprecate String.subSequence(start, end) function

Deprecate kotlin.io.createTempDirectory() and kotlin.io.createTempFile() functions

Hide InputStream.readBytes(Int) function

Unify Kotlin/Native stack trace printing with other platforms

Correct Iterable<T>.intersect() and Iterable<T>.subtract() behavior

Tools

Unsupported KGP version warning when using kotlin-dsl and kotlin("jvm") plugins

Deprecate kotlin-android plugin for AGP versions 9.0.0 and later

Deprecate testApi configuration

Deprecate createTestExecutionSpec() function

Remove closureTo(), createResultSet(), and KotlinToolingVersionOrNull() functions

Deprecate the ExtrasProperty API

Deprecate HasKotlinDependencies in KotlinCompilation

Deprecate npm and Yarn package manager internal functions and properties

Deprecate support for PhantomJS

Prohibit subclassing of classes that set up test runs or JavaScript runtime

Deprecate ExperimentalWasmDsl annotation class

Deprecate ExperimentalDceDsl annotation class

Deprecate JavaScript utilities

Deprecate migrated D8 and Binaryen properties

Deprecate create() function in NodeJsExec DSL

Deprecate properties in kotlinOptions DSL

Deprecate kotlinArtifacts API

Remove kotlin.mpp.resourcesResolutionStrategy Gradle property

Deprecated old mode of multiplatform IDE import

Remove properties to disable precise compilation backup

Deprecate destinationDir in CInteropProcess

Deprecate konanVersion in CInteropProcess

Remove KotlinCompile.classpathSnapshotProperties properties

Deprecate getPluginArtifactForNative() function

Build tool removal

Remove support for Ant

05 November 2025