What’s New

Kotlin v2.4.0-RC

v2.4.0-RCPre-release

Kotlin 2.4.0-RC

Added 2
  • Add JVM target bytecode version 26
  • Create a new CLI flag to enable IntrinsicConstEvaluation feature
Changed 5
  • Propagate private members from dependencies in the IR tree
  • Update -Xannotation-default-target CLI parameter doc
  • Do not generate groups in inline lambdas without @Composable calls
  • Stabilize runtime ABI for PowerAssert initial release
  • Automatically add runtime library dependency for PowerAssert
Fixed 12
  • Fix tests failing with fake override property missing accessors or backing field
  • Fix IllegalStateException due to already bound symbol
  • Fix contracts in 2.4 stdlib to be compatible with 2.3 compiler
  • Fix contract on function getting discarded if any of effect declarations is unknown
  • Fix false positive UNINITIALIZED_ENUM_COMPANION on LV 2.3 and lower
  • Fix false positive UNINITIALIZED_ENUM_COMPANION in enum access with explicit receiver in enum initializer when enum class has a companion
Removed 2
  • Remove withKotlinBuiltinsHack present in JKlibIrLinker.kt
  • Hide returnsResultOf under a separate flag and remove its usages from kotlin stdlib
Changelog
Backend. J2KLIB
  • KT-84877 [J2KLIB] Remove withKotlinBuiltinsHack present in JKlibIrLinker.kt
  • KT-85846 Tests failing with fake override property missing accessors or backing field
  • KT-85717 IllegalStateException due to already bound symbol
  • KT-86204 [JKlib] Propagate private members from dependecies in the IR tree
Compiler
  • KT-86210 Update -Xannotation-default-target CLI parameter doc
  • KT-85948 Contracts in 2.4 stdlib is not compatible with 2.3 compiler
  • KT-85957 Contract on function is getting discarded if any of effect declarations is unknown
  • KT-86130 False positive UNINITIALIZED_ENUM_COMPANION on LV 2.3 and lower
  • KT-84860 False positive UNINITIALIZED_ENUM_COMPANION in enum access with explicit receiver in enum initializer when enum class has a companion
  • KT-84319 Add JVM target bytecode version 26
  • KT-85825 Context parameter lambda loses context type when wrapped in nested run blocks
  • KT-84960 Property contract leaks unsubstituted type parameter in smart cast
Compose compiler
  • b/509945632 Do not generate groups in inline lambdas without @Composable calls
IR. Interpreter
  • KT-86083 Create a new CLI flag to enable IntrinsicConstEvaluation feature
JVM. Reflection
  • KT-86017 KClass.constructors returns all java.lang.String constructors for mapped type kotlin.String
  • KT-85999 Reflection: ByteArray KType incorrectly has type arguments in Kotlin 2.4.0
Libraries
  • KT-86027 Hide returnsResultOf under a separate flag and remove its usages from kotlin stdlib
Native
  • KT-84733 LLVM Update: rebase LLVM once the upstream stabilizes
Tools. Compiler Plugin API
  • KT-85969 KtLint incompatible with Kotlin 2.4.0-Beta2 (parsing errors / Extensions storage issue)
Tools. Compiler Plugins
  • KT-86170 PowerAssert: Stabilize runtime ABI for initial release
  • KT-85250 PowerAssert: Automatically add runtime library dependency
Tools. Compiler plugins. Serialization
  • KT-85554 Serialization: "IndexOutOfBoundsException" on property generated by Compose plugin
  • KT-85963 IncompatibleClassChangeError: Expected non-static field $stable on deserialization of @Serializable data class when Compose compiler plugin is applied before Serialization plugin
Tools. Gradle
  • KT-85373 Compile against Gradle API 9.5.0
  • KT-85374 Run tests against Gradle 9.5.0
Tools. Gradle. Multiplatform
  • KT-85877 The number of SPM direct dependencies is multiplied on number on targets
  • KT-85706 SwiftPM Import: Updating package version in build script updates version in the lock file
  • KT-83370 Incorrect metadata transformation for stdlib's webMain source set
Tools. Gradle. Native
  • KT-85984 linkReleaseFrameworkIosSimulatorArm64 is executed during Debug iOS build since 2.4.0-Beta2
  • KT-86024 Empty main compilations cause w: [COMPILER_ARGUMENTS_WARNING] There are libraries in -friend-modules CLI argument that are not included in -library CLI argument:
Tools. Gradle. Wasm
  • KT-85974 K/Wasm: Do not set -Xir-per-module for Wasm tasks
View original

Discussion