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
- Fix context parameter lambda losing context type when wrapped in nested run blocks
- Fix property contract leaking unsubstituted type parameter in smart cast
- Fix KClass.constructors returning all java.lang.String constructors for mapped type kotlin.String
- Fix reflection ByteArray KType incorrectly having type arguments in Kotlin 2.4.0
- Fix serialization IndexOutOfBoundsException on property generated by Compose plugin
- Fix IncompatibleClassChangeError on deserialization of @Serializable data class when Compose compiler plugin is applied before Serialization plugin
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.ktKT-85846Tests failing with fake override property missing accessors or backing fieldKT-85717IllegalStateException due to already bound symbolKT-86204[JKlib] Propagate private members from dependecies in the IR tree
Compiler
KT-86210Update -Xannotation-default-target CLI parameter docKT-85948Contracts in 2.4 stdlib is not compatible with 2.3 compilerKT-85957Contract on function is getting discarded if any of effect declarations is unknownKT-86130False positive UNINITIALIZED_ENUM_COMPANION on LV 2.3 and lowerKT-84860False positive UNINITIALIZED_ENUM_COMPANION in enum access with explicit receiver in enum initializer when enum class has a companionKT-84319Add JVM target bytecode version 26KT-85825Context parameter lambda loses context type when wrapped in nestedrunblocksKT-84960Property contract leaks unsubstituted type parameter in smart cast
Compose compiler
b/509945632Do not generate groups in inline lambdas without@Composablecalls
IR. Interpreter
KT-86083Create a new CLI flag to enableIntrinsicConstEvaluationfeature
JVM. Reflection
KT-86017KClass.constructors returns all java.lang.String constructors for mapped type kotlin.StringKT-85999Reflection: ByteArray KType incorrectly has type arguments in Kotlin 2.4.0
Libraries
KT-86027Hide returnsResultOf under a separate flag and remove its usages from kotlin stdlib
Native
KT-84733LLVM Update: rebase LLVM once the upstream stabilizes
Tools. Compiler Plugin API
KT-85969KtLint incompatible with Kotlin 2.4.0-Beta2 (parsing errors / Extensions storage issue)
Tools. Compiler Plugins
KT-86170PowerAssert: Stabilize runtime ABI for initial releaseKT-85250PowerAssert: Automatically add runtime library dependency
Tools. Compiler plugins. Serialization
KT-85554Serialization: "IndexOutOfBoundsException" on property generated by Compose pluginKT-85963IncompatibleClassChangeError: Expected non-static field $stableon deserialization of@Serializabledata class when Compose compiler plugin is applied before Serialization plugin
Tools. Gradle
Tools. Gradle. Multiplatform
KT-85877The number of SPM direct dependencies is multiplied on number on targetsKT-85706SwiftPM Import: Updating package version in build script updates version in the lock fileKT-83370Incorrect metadata transformation for stdlib's webMain source set
Tools. Gradle. Native
KT-85984linkReleaseFrameworkIosSimulatorArm64 is executed during Debug iOS build since 2.4.0-Beta2KT-86024Empty 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-85974K/Wasm: Do not set -Xir-per-module for Wasm tasks