Changelog
Analysis API
KT-65683Analysis API: Dangling file session creation causes acomputeIfAbsentcontract violation
Analysis API. FIR
KT-70896AA: False positive deprecation warning with override of built-in method in JDK mapped classKT-84625Analysis API: collectDesignationPath fails for nested classes inside plugin-generated top-level classes
Analysis API. Infrastructure
KT-84913Extract compiler classes used by the PSI & Analysis API to a separate moduleKT-64986Analysis API: Implement Analysis API tests for different KMP PlatformsKT-80379Extract per-module test generators for AA tests
Analysis API. PSI
KT-84715removeModifier doesn't delete whitespaces around the removed modifierKT-84564KtEnumEntry.delete deletes semicolonKT-84781Use computed properties in KotlinElementTypeProviderImpl
Analysis API. Stubs and Decompilation
KT-85371StackOverflowError from LLKotlinStubBasedLibrarySymbolProvider and StubBasedClassDeserializationKT-83935Support KDoc loading in decompiled stubs
Analysis API. Surface
KT-82519Automatically recognize the appropriate analysis mode for in-memory file copies based on their contentKT-85239Streaming version of collectDiagnostics()KT-83921Extend KaKDocProvider to read Kdoc from KLIB metadataKT-77426KaFirCompilerFacility uses an arbitrary JVM counterpart for common sourcesKT-84737KaCallableSymbol#directlyOverriddenSymbols doesn't work for java overrides of kotlin propertiesKT-84621Migrate symbol tests to ManagedTest properlyKT-80575KaFirJavaInteroperabilityComponent#getJavaGetterName should not throw exception on incomplete code
Backend. Wasm
KT-76205K/Wasm: stabilize and turn on incremental compilation by defaultKT-83728[Wasm] Invalid Ir type while suspend call with blocked if null comprehansionKT-81637K/JS/Wasm interop: Inconsistent behavior ofis/asoperations forJsReference<C>andC
Compiler
New Features
KT-84484Companion Extensions Analysis & ResolutionKT-84298K2: Generate IR for Companion Blocks & ExtensionsKT-84292Enforce Companion Blocks & Extensions Language Feature during ResolutionKT-84291Companion Blocks & Extensions CheckersKT-84290Callable References to Companion Block Declarations & ExtensionsKT-84287Build Raw FIR for Companion Blocks & ExtensionsKT-73256Implementallmeta-target for annotationsKT-84319Add JVM target bytecode version 26KT-84297Serialize & Deserialize Companion Block Declarations & Extensions to/from MetadataKT-84199Implement DontMakeExplicitNullableJavaTypeArgumentsFlexible feature
Fixes
KT-80489Collection literals: experimental version (Frontend)KT-84566Prevent launching Default dispatcher threads from IJ SDK in kotlin compilerKT-85358Native: roll back the workaround for KT-84678 once MapLibre has been properly fixedKT-84931Incorrect type nullability in SAM super type in anonymous class-based SAM conversionKT-83920False positive "modifier 'value' is not applicable to 'local variable'" with soft keyword in positional destructuring (square bracket) declarationKT-85626@JvmRecordin commonMain breaks compileCommonMainKotlinMetadata with "Cannot access 'java.lang.Record'"KT-52673Don't report deprecation warning/error on importsKT-84991ImproveArgument type mismatchdiagnosticsKT-82216Sanitize '.kotlin_module' filenameKT-84678K/N: Undefined symbol from SPM-added ObjC frameworks when linking iOS targetKT-77726Move FirUnusedExpressionChecker to the default checkers listKT-85354checkPsiTypeConsistency: add psi text attachmentsKT-85479Improve diagnostic messages for upper bound violationsKT-84585Upper bound violated warning for expansion of type alias in LHSKT-84924Native: stdlib-cache.lock used by mulitple processesKT-85244False positive DUPLICATE_BRANCH_CONDITION_IN_WHEN with guard conditionKT-78432No-arg constructor should be generated for regular classes with a value class parameter in case of JvmExposeBoxedKT-85487Investigate why WrapContinuationForTailCallFunctions does not work in Android TestKT-59633K2: Implement running AndroidRunner tests with FIRKT-85392Native: concurrency issues in per-file cachesKT-76237Store File-level annotations in KLIB metadata separatelyKT-85162Introduce diagnostics to refine numeric types castingKT-80060False positive REDUNDANT_CALL_OF_CONVERSION_METHOD in case of overloadsKT-85289False-positive smartcast from == with type parameter based variableKT-83890return-value-checker: false positive "Unused return value of 'context'" on kotlin.context() functionsKT-84106False negative "NON_EXHAUSTIVE_WHEN": "NoWhenBranchMatchedException" at runtime with sealed and platform typeKT-85005Considerall:target in the checker of repeatable annotationsKT-85210Enabling -XXLanguage:+IntrinsicConstEvaluation breaks highlighting on some broken codeKT-85217Rework implementation supporting simple-to-suspend function conversionKT-85036Introduce a proper handling of optional expectation annotations in platform checkers during metadata compilationKT-85086False-negative JVM_EXPOSE_BOXED_CANNOT_BE_THE_SAMEKT-84082[OPT_IN_USAGE_ERROR] duplicates for destructuring declarationKT-84732Collection literals: "ExpectedFirCollectionLiteralImplto be resolved" in RHS of equality operatorKT-84841Collection literals: Drop special treatment ofwhenwith expected typeKT-85007Properly implement special rules forkotlin.Resultin@JvmExposeBoxedsupportKT-74383Support new callable reference nodes in JVM backendKT-84828Cleanup JVM backend from the old callable references-related codeKT-85006Refine error messages forINAPPLICABLE_ALL_TARGETdiagnosticKT-84296Support Companion Blocks in CFGKT-85058Remove final field modification in DescriptorRendererOptionsImpl to prevent warnings on JDK 26+KT-85021False positive SUBCLASS_CANT_CALL_COMPANION_PROTECTED_NON_STATIC error in multi-module projectKT-84727[K/N] Segfault when returning null as generic Int type from dynamic frameworkKT-85062Deprecate language version 2.1KT-83460Deprecation from@all:Deprecated is not propagated to property accessors/backing fieldsKT-84859Skip deprecation phase for generic arguments in qualifier receiver of static call for companion block members and extensionsKT-85050[Swift Export] usage of inline classes with ref types crashes at runtimeKT-84983Type parameter annotations are lost for local functionsKT-78800Investigate FirMissingDependencySupertypeInQualifiedAccessExpressionsCheckerKT-73945K2 IDE: Duplicated inspections for redundant 'open' in interface memberKT-84294Ensure Context Sensitive Resolution works with Companion Blocks & ExtensionsKT-81675Improve message for CONTEXTUAL_OVERLOAD_SHADOWEDKT-84994Rework optimization for companion extension resolutionKT-81598incorrect type mismatch error messages for generic calls with explicit type argumentsKT-83587K2: Missing null-check when using == on Short! and Byte! platform typesKT-261Can't specify function return type in a subclass
Compose compiler
New features
c1bbb47Started inferring the stability of all interfaces to be
Stability.Unknown, expect for those explicitly marked as known
stable.
Fixes
b/504284805Fix indentation for generated proguard mappingsb/422193018Fix applier inference for nested composables of different types.b/497751457Prevent a$stableproperty from being added to any object.b/427530633Do not infer a getter call as static across when it is defined in another file.b/427530633Started usingStability.Runtimemore broadly. Now, when an
element depends on the stability of aninternalorpublicclass
defined in another file, the element will no longer infer the
stability of that class and will depend on the runtime stability of
that class instead.
IR. Actualizer
KT-84293Expect Actual Matching for Companion Block Declarations & Extensions
IR. Inlining
KT-85605"Local delegated property has not delegate" exception when calling inline function containing delegated property in a lambda from within an inline lambda
IR. Interpreter
KT-80804Enable constant evaluation for more standard libraryKT-83514Get rid ofEvaluatedConstTracker
IR. Tree
KT-79663KLIB-based compilers: Promote partial linkage to "always on"KT-76934Drop old IR parameter APIKT-74763Build: refactor ':compiler:backend.common' and ':compiler:ir.backend.common' modules
JVM. Reflection
KT-85550Reflection: KParameter.type.classifier returns boxed KClass for non-nullable primitive typesKT-85285Reflection: InvocationTargetException (UInt cannot be cast to Integer) when reading UInt annotation property via getterKT-85322Reflection: KotlinReflectionInternalError when loading ProGuard-obfuscated code compiled before 2.3.20KT-84679Reflection: confusing "Kotlin reflection is not yet supported for synthetic Java properties" for reference to Java enum's entries propertyKT-85025KTypeParameterinstances not equal to each other for the same type parameter in member specializationKFunctionKT-85091Reflection: "KotlinReflectionInternalError: Unsupported parameter owner: null" on attempt to get annotations of annotation constructor parameterKT-84382Reflection: raw list in Java type is transformed to List instead of MutableList
JavaScript
Fixes
KT-82395Support top-level declarations from compiler plugins in JS incremental compilationKT-81787KJS: Value class type lost when using JsExport on interfaceKT-85411Fix conversionCombinations.kt tests for the JS targetKT-72198KJS: ES2015 interop with ValueClassKT-15101js: Same callable references are not equalKT-84810[K/JS] Callable references operator produces duplicatesKT-85323JsClass optimization doesn't work well for primitivesKT-60651KJS / ES6: init block and constructor are not calledKT-84601K/JS:KClass<>reference doesn't work in JS counterside as anewtarget in ES6 modeKT-85099KotlinJS: JsPlainObject from the js-plain-objects plugin does not respect overridesKT-84615KJS: Forbid@JsStaticon extension functions/propertiesKT-84633Kotlin/JS: "Serializer for class not found" error when IR output granularity iswhole-programKT-85038Kotlin/JS:@JsExporton sealed external interface with companion object causes NPEKT-85047Kotlin/JS:@JsStaticon suspend fun of class companion generates incorrect d.tsKT-84517K/JS: bad mappings data in outputted Kotlin stdlib source map
Klibs
KT-84415Ineffective hashMap usage in IrSymbolDeserializerKT-84511[Native][Tests] Improve descriptor-related logic in NativeCliBasedFacades.ktKT-85017[PL] Add test for addedinternal abstract funKT-84488Export in previous version: Prohibit using on 2nd stageKT-85149Klib Dump parser: fix parsing of qualified names adjacent to vararg symbolKT-85129Klib Dump parser: fix enum names parsingKT-84684RemoveUserVisibleIrModulesSupportfrom IR linkerKT-84820[K/N] Loadlibcallbacksandlibllvmstubsfrom configured path
Language Design
KT-73821Decide the future of the ForbidUsingSupertypesWithInaccessibleContentInTypeArguments language featureKT-80852Version overloading: generate overloads corresponding to different versions of a function whose parameters are annotated with@IntroducedAt()KT-85120@IntroducedAton expect parameter cannot be properly actualized
Libraries
KT-85122Deprecate kotlin.io.readLine with WARNINGKT-84970Deprecate AbstractCoroutineContextKey and associated APIKT-84818[Regex] Native and Wasm: Decomposed Unicode character are incorrectly process with CANON_EQ flagKT-80772K/N: Regex: improve look behind matching performance for "fixed-length" patternsKT-81395Stabilize kotlin.uuid.Uuid APIKT-85127Remove kotlin.test.assert*NoInline hidden functionsKT-84264Add appropiate@SinceKotlinto new contractsKT-84921Add 'returnsResultOf' contract to appropriate declarations in the stdlibKT-84697Update the list of JDKs the stdlib is tested with
Native
KT-83914Native: when loading JNI libraries, java.library.path can contain system directories with libraries with same namesKT-84826Bump the minimum deployment version of Apple targetsKT-83133Native: don't usesun.misc.Unsafein the compiler and cinterop when running on JDK 25+KT-84686Removing x64 in gradle file breaks builds on certain platformsKT-83648Native: don't usesun.misc.UnsafeinNativeMemoryAllocatorwhen running on JDK 25+KT-83647Native: don't usesun.misc.UnsafeinnativeMemUtilswhen running on JDK 25+
Native. Build Infrastructure
KT-85191K/N: Dependency cycle in libclangInteropKT-84937Kotlin/Native: non-reproducible .bc for mingw_x64
Native. C Export
KT-61748KMM- warnings when compiling native targets (Kotlin 1.9.0)
Native. C and ObjC Import
KT-85705Swift-generated headers with external_source_symbol produce duplicate enum declarationsKT-85399Kotlin/Native: TypeCastException when casting ObjC Protocol MetaClass with genericSafeCasts enabledKT-85508K/N: TypeCastException when using nw_parameters_create_secure_tcp block parameter on 2.3.20KT-84023Modular import fails with an obscure error when the failing module is not the last one
Native. ObjC Export
KT-85171Red Swift code in Native UI Multiplatform App project from Template Gallery
Native. Runtime
KT-84331Kotlin/Native: RunLoopFinalizerProcessor needs initialized runtime before it has any jobs
Native. Runtime. Memory
KT-83670K/N: gc concurrent mark phase assert Failed to terminate mark in STW in a single iteration
Native. Swift Export
New Features
KT-82705Support convenient export of Flow types in Swift exportKT-85130[Swift Export] Preserve TypeInfo on SharedFlowKT-84361[Swift Export] Preserve TypeInfo on StateFlow
Fixes
KT-84317Swift Export: "protocol members can only be marked unavailable in an '@objc' protocol" in generated code for kotlinx-coroutinesKT-85380[Swift Export] Attempt to bridge unbridgeable type: SirUnsupportedTypeKT-85704[Swift Export] cannot infer generic type of function returning a generic typeKT-85711[Swift Export] suspend function returning non-null generic fails to compileKT-85715[Swift Export] generic interface in typealias fails to compileKT-85714[Swift Export] unsupported input type param in functional receiverKT-85458[Swift Export] value of a closure returning a closure generates invalid swift codeKT-85521[Swift Export] conflicting overloads for generated Kotlin bridgesKT-85293SwiftExportCoroutinesWithResultValidationTest.testCoroutines fails after cross-pushKT-84515[Swift Export] suspend functional parameter generates invalid Swift codeKT-82282Swift Export: suspend function returning Array leads to incompilable codeKT-81540Swift Export: using interface in Set generates incompilable codeKT-80305Support coroutines in Swift ExportKT-66873Swift Export: suspendable contravariant functional typeKT-85272[Swift Export] conflicting imports for kotlinx-coroutinesKT-85163[Swift Export] Flow of Unit values crashesKT-85159[Swift Export] Flow is not properly being cancelledKT-84226[Swift Export] Flow in contrvariant position is not allowedKT-84485[Swift Export] Flow with nullable elementsKT-83730Generated Swift switch on bridged Kotlin enum crashes with fatalErrorKT-85016[Swift Export] it's not OK to expose Flow as AsyncSequenceKT-84979Swift Export Nullability: UnitKT-83821Swift Export: suspend function returning Nothing leads to incompilable code
Tools. BCV
KT-83476Use Maven publications as dump input [ABI Validation]
Tools. Build Tools API
New Features
KT-82791BTA: introduce an option forExecutionPolicy.WithDaemonto control the daemon log files pathKT-80963BTA: Add structured information about reported messages to KotlinLoggerKT-73037Add input (like compiler arguments) changes tracking
Fixes
KT-84228BTA: Improving KDoc generation for Enums and Custom TypesKT-85738BTA forward compatibility: NoSuchFieldError on X_IGNORED_ANNOTATIONS_FOR_BRIDGES when API 2.3.0 is used with impl 2.4.0KT-85082Make Xignored-annotations-for-bridges type safeKT-82390[BTA] Remove deprecated non-builder factory functions and classesKT-85072AbstractMethodError when calling discoverScriptExtensionsOperationBuilder with pre-2.4.0 compilerKT-85447BTA: deprecate JvmCompilerArguments.contains (warning)KT-85092[BTA] Update BTA Backward Compatibility Testing: 2.3.20-RC → 2.3.20KT-85439BTA: Warn or error when incompatible compiler arguments are passed via applyArgumentStringsKT-75540Build Tools API Should Reject -Xbuild-file ArgumentKT-85391[BTA] Hide boilerplate required to load isolated BTA implementationKT-80679Add support for the Build Tools API [ABI Validation]KT-85035Don't expose X_COMPILER_PLUGIN_ORDER in CommonCompilerArgumentsKT-84738Make Xscript-resolver-environment type safeKT-85204Make Xdump-directory type safeKT-85205Make Xdump-perf type safeKT-85069Make Xnullability-annotations type safeKT-85167Make Xjsr305 type safeKT-85094Make Xwarning-level type safeKT-85294BTA: Replace hardcoded@sincein KDoc with dynamic versioningKT-85333Add BTA tests for BACKUP_CLASSES and KEEP_IC_CACHES_IN_MEMORY behavior after compilation errorKT-84770BTA: default options cannot be retrieved from many option objectsKT-85224Add@ExperimentalArgumentApito compiler argument DSL typesKT-84322Make X_PROFILE BTA compiler argument type safeKT-84953Fail TC build if generated files changeKT-85189Refactor path argument types: flatten hierarchy and improve namingKT-84984Runtime NPEs caused by null return in CompilerMessageRenderer implementationKT-84015Introduce detection of custom script names to new BTA API
Tools. CLI
KT-85414Argument DSL:delimiter = KotlinCompilerArgument.Delimiter.PathSeparatorgenerates invalid Kotlin codeKT-85001ConvertImplicitJvmExposeBoxedlanguage feature to analysis flagKT-84999Don't poison binaries withImplicitJvmExposeBoxedlanguage featureKT-85004Set proper since version for language feature about property annotation targetingKT-56850Separate K/Wasm CLI entry point from K/JS CLI
Tools. Compiler Plugin API
KT-85133Drop deprecated K1 specific methods from IrPluginContext
Tools. Compiler Plugins
KT-75656PowerAssert: Create runtime libraryKT-75873PowerAssert: display callable reference value under '::'KT-85151PowerAssert: Surround string and character values with quotesKT-85184PowerAssert: Annotation may only be used on expect and non-override functionsKT-69036Power-Assert indent multiline valuesKT-85089PowerAssert: Wasm CompileError when usingPowerAssert.explanation
Tools. Gradle
New Features
KT-76197Write Kotlin compiler warnings and errors to Problems API
Fixes
KT-85412Module name is not sanitized with older Kotlin compiler versionsKT-65566Use the new ConfigurationContainer consumable method to create consumable configurationsKT-85509Remove deprecated API in the 2.4.0 releaseKT-83858Compatibility with Gradle 9.4.0 releaseKT-69830Support Gradlecom.gradle.develocityplugin in KGPKT-85433Gradle: deprecate non-BTA JVM compiler execution modeKT-80448Remove internal & deprecated API from ExtrasProperty.ktKT-69701Gradle: module name is passed inconsistently to different types of compilationsKT-83860Run tests against Gradle 9.4.0KT-83859Compile against Gradle API 9.4.0KT-84729Update Gradle plugin-publish version to enable configuration cache badge on Gradle plugins portal
Tools. Gradle. BCV
KT-83999ABI validation: Groovy DSL doesn’t deprecate included/excluded filters, allowing four filter configs instead of twoKT-84461Remove the use of abi-tools-api from KGP [ABI Validation]KT-84100Add Deprecated annotation to legacyDump block and property [ABI Validation]
Tools. Gradle. Compiler plugins
KT-85343Update Compose Gradle plugin deprecations before 2.4
Tools. Gradle. JS
KT-84753DeprecateKotlinJsCompilerTypeandKotlinProjectExtensionmethods using itKT-81033K/JS, Wasm: Remove deprecated wasm declarations in "js" packageKT-81034K/JS, Wasm: Remove deprecated public constructors of JS declarationsKT-81030K/JS, Wasm: remove deprecated NodeJsExec.createKT-81037K/JS, Wasm: Remove deprecated internal JS functions
Tools. Gradle. Multiplatform
KT-84767K/N: associateWith triggers warning about friend-modules libs not included in -library argumentKT-69571compileNativeMainKotlinMetadata not handling project/prebuilt substitutionsKT-84533KMP: compileCommonMainKotlinMetadata: "Unresolved reference" for androidx.savedstate from Maven (works with project() dependency)KT-84669SPM import: If iosApp dir located outside of the project, checkSyntheticImportProjectIsCorrectlyIntegrated will failKT-84085Remove deprecated gradle property kotlin.kmp.isolated-projects.supportKT-84597Remove trailing comma for dependencies blocks settings in Package.swiftKT-82895kotlin-stdlib import is flaky in commonTest in 2.1.21
Tools. Gradle. Native
New Features
KT-83873Redo how dynamic library linkage and promotion are handled
Fixes
KT-69896Native: output to stderr ends up in the Gradle logKT-85708[KGP] dSYM copy task ignoresisStaticdue to eager read before framework configurationKT-84262integrateEmbedAndSign produces an incorrect Gradle call for the root projectKT-84730Add Kdocs to SwiftPM import APIsKT-85502Swift PM Import: "Library not loaded": KotlinMultiplatformLinkedPackage.framework is not copied next to the executableKT-85510Cleanup native tasks APIKT-82824Make linker hack path relativeKT-85128Refactor SwiftPM import lock tests and test utilsKT-83874Linker hack doesn't work when clang uses response filesKT-83681Parallelize parts of SwiftPM import pipeline that are called during import
Tools. Gradle. Wasm
KT-85046K/Wasm: Wasm per-module Gradle integration tests on Windows
Tools. Incremental Compile
KT-85387BTA: switch the default value ofMONOTONOUS_INCREMENTAL_COMPILE_SET_EXPANSIONtotrueKT-85386BTA JVM IC: 'moduleName' is null!KT-84450Star imports are not reported via FirImportTrackerComponent
Tools. JPS
KT-81579JPS: -Xwarning-level=DEPRECATION:warning not supported
Tools. Kapt
KT-32743Kapt, Maven: Do not include compile classpath entries in the annotation processing classpathKT-41217Running kapt with Maven does not seem to include the compilation classpath
Tools. Maven
KT-84386Support Maven Toolchains in kotlin-maven-pluginKT-76062Maven: remove Kotlin script execution supportKT-85317Auto‑align jvmTarget with the project’s Java levelKT-84101Maven: compile and test-compile handle sourceDirs inconsistentlyKT-84653Add integration test for KAPT with smart defaults in mixed Kotlin+Java projectsKT-85121Maven: enable configuration inputs tracking in BTAKT-84778Add integration test for auto-bind execution order in mixed Kotlin+Java projectsKT-85146Maven: Adding stdlib as smart-default may break maven dependency resolution for other pluginsKT-83109Remove beanshell and groovy verification in kotlin-maven-plugin-test
Tools. REPL
KT-77816REPL: Support forconstpropertiesKT-84483[K2 Repl] NullPointerException in Analysis when using custom classesKT-84803[REPL] FirReplSnippet: provide the eval function symbol instead of the name (evalFunctionName)
Tools. Scripts
KT-85105Scripts: JVM backend internal error (IR lowering) when scratch file contains anonymous objectKT-85103Exception while generating code when explain destructuring declsKT-85029Kotlin Scripting: ScriptDiagnostic reports "at null" instead of error location
Tools. Statistics (FUS)
KT-85628KGP: composite build FUS metrics fail on access of 'configurationTimeMetrics'
Tools. Wasm
KT-75086Wasm: Deprecate and remove D8 in js packages