Changelog
Analysis API
KT-73337
Migrate analysis sources to new IR parameter APIKT-68393
Analysis API: RenameKaClassLikeSymbol. classIdIfNonLocal
toclassId
KT-62924
Analysis API: rename KtCallableSymbol.callableIdIfNonLocal -> callableIdKT-63718
Analysis API: Stub-based dependency symbol providers of library source sessions compute the wrong package name sets
Analysis API. FIR
Fixes
KT-76540
K2: Missing library dependency on Android SDK from androidx.activity-1.8.2 causes LiveEdit failuresKT-73266
K2. "Declaration should have non-local container" with unclosed annotation on top-level functionKT-76432
JavaClassUseSiteMemberScope: Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImplKT-76217
K2 AA: "No fir element was found for KtParameter" with multiple context parameter listsKT-76366
ContextCollector: annotations on class members don't have the class as implicit receiverKT-76352
ContextCollector: wrong class annotation context in BODY modeKT-76341
ContextCollector: support dangling modifiersKT-76332
"Declaration should have non-local container" for declaration inside file annotationKT-76331
Cleanup FileStructureElement for classesKT-76115
DisableFirElementBuilder#getFirForElementInsideAnnotations
optimization for files, classes and scriptsKT-76347
ContextCollector: avoid resolution for enum entry annotationsKT-76272
Cleanup AbstractFileStructureTestKT-75542
K2 AA: "FirDeclaration was not found for class KtNamedFunction, fir is class FirErrorExpressionImpl" for unclosed annotation on member functionKT-73117
K2 AA: Exception "Setter is not found" when val has a setter without bodyKT-73719
K2. "FirDeclaration was not found for class KtDestructuringDeclaration, fir is class FirBlockImpl" on incorrect chain call
Analysis API. Providers and Caches
KT-74541
Analysis API: Include files generated by resolve extensions inKaModule
content scopesKT-64236
Analysis API: Introduce a separate module for fallback dependencies of library source modulesKT-63780
Analysis API: Invalidate resolvable library sessions when binary library modules are modified
Analysis API. Stubs and Decompilation
KT-71787
PsiRawFirBuilder.Visitor#visitStringTemplateExpression
forces AST loading
Analysis API. Surface
KT-76018
K2: Stop the wold leads to deadlock/freezeKT-73669
Support psi-based symbol pointer for implicit primary constructorsKT-76011
KaFirNamedClassSymbol#companionObject
doesn't provide generated objects generated by compiled pluginsKT-76008
Provide PSI-based implementation forKaFirNamedClassSymbol#companionObject
Backend. Native. Debug
KT-75991
Xcode 16.3: Fix lldb stepping test over an inline function
Backend. Wasm
KT-76747
[Wasm] Wasm name section absent for wasm structsKT-76701
K/Wasm: custom formatters are not loaded when a project is built with incremental compilationKT-66081
K/WASM:0/0
,5/0
and5%0
throw not ArithmeticException, but RuntimeErrorKT-76287
[Wasm] Enable stdlib and kotlin.test tests after compiler bootstrapKT-75871
[Wasm] Implement new RTTI approachKT-75872
Wasm / IC: IllegalStateException: IC internal error: can not find libraryKT-73362
Migrate K/Wasm sources to new IR parameter API
Compiler
New Features
KT-70722
Implement better Kotlin warnings for value classes and JEP 390 (Warnings for Value-Based Classes)KT-57919
Store all annotations in Kotlin metadata on JVM under a flagKT-54205
Support jakarta Nullability annotations
Performance Improvements
KT-76422
FirJavaFacade#createFirJavaClass: do not compute super type references right away
Fixes
KT-75828
Store backing field/delegate annotations and extension receiver annotations in metadataKT-76663
KJS: KotlinNothingValueException caused by expression return since 2.1.20KT-76615
K2: "IllegalArgumentException: Inline class types should have the same representation: Lkotlin/UByte; != B" for mixed Java/Kotlin codeKT-76805
Wrong NPE occurs when assigning synthetic properties with platform types in Kotlin 2.1.20KT-76253
K2 Compiler: Less precise diagnostic COMPONENT_FUNCTION_AMBIGUITY for flexible typeKT-76583
CCE: suspend lambda attempts to unbox value class parameter twice after lambda suspendedKT-59526
Store annotation default values in metadata on JVMKT-63850
K2: setter with an annotated parameter hasisNotDefault == false
flag in metadataKT-75712
-Wextra: false positive UNUSED_LAMBDA_EXPRESSION on functional type variable assignment with inferred typeKT-69624
Debugger: Missing local variable in Variables view (inline function)KT-75992
Xcode 16.3: stacktraces on simulators are not symbolicatedKT-76199
Introduce -Xcontext-sensitive-resolution compiler flagKT-75553
MISSING_DEPENDENCY_SUPERCLASS
andMISSING_DEPENDENCY_SUPERCLASS_WARNING
is reported at the same time on the same elementKT-76159
Obsolete error "'@JvmDefaultWithCompatibility
' annotation is only allowed on interfaces" should be removedKT-76660
False negative RETURN_NOT_ALLOWED in lambda in default argument leads to NoClassDefFoundError:$$$$$NON_LOCAL_RETURN$$$$$
KT-76301
Fail to infer types after syntactical changeKT-74999
K2: KotlinNothingValueException within Extension FunctionKT-76675
KIAEWA exception at KaFirDataFlowProvider with non-local return from nested inline callKT-75756
Backend Internal error: Exception during IR lowering when trying to access variable from providedProperties in class within kotlin custom scriptKT-76171
"KotlinIllegalArgumentExceptionWithAttachments: Expected expression 'FirSingleExpressionBlock' to be resolved"KT-76345
Enhance variable fixationKT-76578
[FIR, K1/K2 Regression]lateinit
is allowed on loop parametersKT-76448
FirOverrideChecker: class ClsMethodImpl is not a subtype of class KtNamedDeclaration for factory VIRTUAL_MEMBER_HIDDENKT-73360
Migrate K/JVM sources to new IR parameter APIKT-76606
Enable 'Indy: Allow lambdas with annotations' by defaultKT-74852
Kotlin/Native: allow caches for thread state checker and sanitizersKT-76130
IR evaluator does not support array literals in annotation parameter default valuesKT-76436
Missing K2 checker: non-local return through lambda passed to inline f/oKT-74326
False negative: no variable must be initialized error though code doesn't compileKT-74325
Explicit API mode does not enforce explicit return types for extension propertiesKT-76572
FIR_NON_SUPPRESSIBLE_ERROR_NAMES does not contain deprecation errorsKT-75704
RefactorFirWhenSubjectExpression
KT-76284
Flexible captured type is not approximated in receiver positionKT-76192
RETURN_TYPE_MISMATCH with same expected and actual type: nullability of actual type is omittedKT-75944
Allow using invokedynamic for lambdas with no 'Runtime' level retention annotationsKT-76396
FirIntegerConstantOperatorScope: NoSuchElementException: Collection contains no element matching the predicateKT-76209
CONFLICTING_UPPER_BOUNDS onNothing
boundKT-46119
NONE_APPLICABLE instead of NAMED_ARGUMENTS_NOT_ALLOWED with overloaded Java constructor callKT-75503
Run lazy resolution in CallableCopyTypeCalculator and use withForcedTypeCalculator everywhere in checkersKT-76485
Don't report EXTENSION_SHADOWED_BY_MEMBER if extension can be called with named argumentsKT-76154
False positive "EXTENSION_SHADOWED_BY_MEMBER" when extension adds default values to parametersKT-76527
False positive UNSUPPORTED_CONTEXTUAL_DECLARATION_CALL with -Xcontext-receivers and implicit invokeKT-63246
K2: False positive NOTHING_TO_OVERRIDE in generic property with context receiver in non generic class extending generic classKT-58534
K2: "Argument type mismatch" with typealias to context receiver functional typeKT-71481
K2: drop pre-1.6 language features from compiler codeKT-74069
False positive UNUSED_EXPRESSION due to Long/Int conversionKT-76381
K2: Expected expression 'FirPropertyAccessExpressionImpl' to be resolvedKT-75234
Add error for callsInPlace contracts on context parametersKT-73805
K2: Investigate missing diagnostic in implicit invoke call on context function type with receiver from module with disabled context parametersKT-41934
NI: a type variable for lambda parameter has been inferred to nullable type instead of not null oneKT-61258
Kotlin/Native: CLASS CLASS name: modality:FINAL visibility:local superTypes:[.Base]KT-75983
Backend Internal error: Exception during IR lowering 'IllegalStateException: Internal error: cannot convert Any to Int'KT-76290
False positive UNUSED_EXPRESSION while returning Unit in the when branchesKT-32358
NI: Smart cast doesn't work with inline function after elvis operatorKT-76316
K2: Missing NON_PUBLIC_CALL_FROM_PUBLIC_INLINE on object extending private class in public inline functionKT-76324
Frontend diagnostic says "... this will be an error in Kotlin N.M" but N.M is already releasedKT-76058
PCLA: compile-time failure on calling a higher-order function from another module inside a lambda assigned to a variable of a type with a postponed type variableKT-75457
Native: cache machinery uses stdlib cache with default runtime options even if custom runtime options are supplied when partial linkage is disabledKT-75571
K2: type mismatch error provides unsubstituted typesKT-31391
'Recursive call is not a tail call' with elvis operator in tailrec functionKT-73420
False-positiveNON_TAIL_RECURSIVE_CALL
on tailrec function with elvis in the return statementKT-75169
Unnecessary EXTENSION_SHADOWED_BY_MEMBER on generic declarationsKT-76339
K2: Dangling modifier list is missed for enum entries in PSI modeKT-75513
Avoid overrides traversal without preinitializationKT-74587
Report an error when JvmDefaultWithoutCompatibility is used with -Xjvm-default=allKT-76257
Annotations with class references are not supported when marking IR declarations as visible to metadataKT-71793
Drop language versions 1.6 and 1.7KT-59272
Incorrect bytecode generated: wrong line number table after conditionKT-69248
K2: IAE “class KtDotQualifiedExpression is not a subtype of class KtCallExpression for factory ENUM_CLASS_CONSTRUCTOR_CALL” with qualified enum constructor callKT-73778
Kotlin Debugger: NSFE on accessing private property from dependencies during evaluationKT-74131
Incorrect line numbers for static initializer with delegated local variableKT-76320
K2: PsiRawFirBuilder: import alias triggers ast loadingKT-63851
K2: NosetterValueParameter
in metadata for property setter with an annotated parameterKT-71002
Possible inheritance from nullable type through typealiasKT-75498
Forbid .declarations access from checkersKT-75112
FE resolves wrong receivers order for property passed to delegateKT-75924
K2. Incorrect generic type Inference "R? & Any" appears for "Add explicit type arguments"KT-75242
Any use-site target can be applied to a lambda and an expressionKT-73051
incorrect direction of subtyping violation in type mismatch error's message for A<X> </: A<Y> given a Tv <: Rv == C constraint from a lambda return positionKT-75090
Argument type mismatch: actual type is 'SuspendFunction0', but 'SuspendFunction0' was expected when anonymous function is passed to function expecting suspend function typeKT-74956
K2: No USAGE_IS_NOT_INLINABLE with compiling an inlined function callKT-75729
KtPsiFactory: no type-safe way to create triple-quoted KtStringTemplateExpression
Compose compiler
New features
5f7e5d1
Enabled PausableComposition feature flag by defaulte49ba7a
Enabled OptimizeNonSkippingGroups feature flag by defaultb/305035807
Add support for@Composable
function references with K2
Fixes
b/409238521
Fix crash when searching for ComposableLambda::invoke function on JSb/408752831
Fix early return with value fromkey
groupsb/388505454
Treat context parameters the same way as extension receiverb/408013789
Add missing return for the default function wrappersb/405541364
Realize coalescable children in the body ofkey
call
IR. Actualizer
KT-70907
Actualize fake override symbols in Ir Actualizer
IR. Inlining
Fixes
KT-70916
IR: Report errors on exposure of private types in non-private inline functionsKT-73155
MoveMapping
fromLoweringContext
back toCommonBackendContext
KT-76186
[IR] Sanitize deserialized IR dump of anonymous classesKT-76145
Enhance error message about poisoned KLIBs in KLIB-based compilersKT-75788
IR inliner: Serialize preprocessed inline functions in a separate place inside KLIBsKT-71416
Perform IR-level visibility diagnostics for inline functions after the first phase of inliningKT-76224
[IR][Inliner] Dumb file is unsuported in IrSymbolBase.getDescriptor()KT-75793
IR inliner: Stop injecting the deserialized function body to LazyIR inline functionKT-75791
IR inliner:NonLinkingIrInlineFunctionDeserializer
should load inline functions from a separate location in a KLIBKT-73708
Use some marker in KLIBs produced with IR inlinerKT-76024
[JS][IR Inliner] Partial linkage: No function found for symbol inkotlin
packageKT-75733
Reorganize execution of the common prefix at 1st phase of compilationKT-75951
[IR Inliner] Illegal non-local return reported by the partial linkage engineKT-75932
Fix a problem with already bound symbol with public IR inline enabled
IR. Tree
KT-73189
Migrate compiler sources to new IR parameter APIKT-76600
Use a language feature to check error on cross-file IrGetField operations generated by compiler pluginsKT-75628
IR validator: Forbid IrExpressionBody for IrFunction
JavaScript
KT-76233
[JS] Extra invalid import line in testJsQualifier()KT-31493
[Kotlin/JS] Can't put typealias in file marked with JsModule annotationKT-64951
Kotlin-Multiplatform does not allow JSExport of expectKT-77021
CompilationException: Encountered a local class not previously collected on inner classes inside anonymous objectsKT-76235
[JS] Extra invalid linetmp_0.tmp00__1 = Options;
in testSuspendFunction()KT-76234
[JS] Extra invalid lineParent
in testNested()KT-73226
Migrate K/JS to new IR parameter APIKT-75254
KJS: Merge AbstractSuspendFunctionsLowering from Common and JS backendsKT-75772
KJS: NullPointerException caused by reference of private class with@JsExport
KT-74384
Support new callable reference nodes in JS backend
Klibs
KT-76061
Add option for suppress warning of missing no-existent transitive klib dependenciesKT-72296
Use specialized signatures for serialized local fake overridesKT-76158
Drop "description" from local signaturesKT-75749
KLIB: Fail with error on attempt to serialize/deserialize SpecialFakeOverrideSignatureKT-75941
[IR Inliner] Abstract function is not implemented in non-abstract anonymous object
Language Design
KT-57274
Allow generic argument to have explicitNothing
upper bound
Libraries
New Features
KT-70456
Base64: Support lineLength parameter for MimeKT-76394
kotlin.time.TimeSource.asClock missingKT-31857
Provide easy way to retrieve annotations for kotlinx-metadataKT-76528
Instant.parseOrNullKT-76163
K/N: Hide or remove CreateNSStringFromKString/CreateKStringFromNSString
Performance Improvements
KT-75647
Optimized sequenceOf(T) overload is missing
Fixes
KT-72138
Stabilize experimental API for 2.2KT-76831
Atomic types: inconsistent behavior on JS and Wasm targetsKT-75290
kotlin-metadata: deprecate hasAnnotations flag, add JVM-only hasAnnotationsInBytecode insteadKT-76193
Common Atomics: 'AtomicArray.compareAndSetAt' and 'compareAndExchangeAt' docs incorrectly suggest they use==
when actually they use===
KT-54077
Consider using SecureDirectoryStream in deleteRecursively even when Path.parent is nullKT-72866
Standard library functions to work with context parametersKT-76743
Add kotlin-scripting-jvm to projectsUsedInIntelliJKotlinPlugin listKT-72483
Clean up redundant stdlib code for Kotlin 2.2KT-76385
Remove suppression from functions to work with context parametersKT-75337
Remove suppress annotations from@IgnorableReturnValue
KT-72137
Review deprecations in stdlib for 2.2KT-75491
Non intuitive work of 'in' (contains) with String range
Native
KT-76552
LLVM Update: rebase the LLVM branchKT-76662
LLVM 19 update: documentationKT-56107
Support Enum.entries for C/ObjC interop enumsKT-76560
LLVM Update: investigate changes in filterStdargH testKT-76283
LLVM Update: pass all testsKT-75829
LLVM Update: port K/N on LLVM 19KT-76280
LLVM Update: benchmarksAnalyzer build failed
Native. C and ObjC Import
KT-76551
LLVM Update: investigate CXFile equality problem further
Tools. BCV
KT-75686
Improve DSL for BCV in KGPKT-75999
ABI validation filter doesn't apply excluded kotlin filesKT-75981
ABI validation filter not applying excluded classes without package namesKT-76129
Abi validation filtering functionality for included classes doesn't work
Tools. Build Tools API
KT-76455
BTA: Compilation is always non-incremental if BTA API >= 2.2.0 is used together with BTA impl < 2.2.0
Tools. CLI
KT-76095
Add JVM target bytecode version 24KT-75588
[2.1.20-RC] "was compiled by a pre-release version of Kotlin and cannot be loaded by this version of the compiler" warnings despite using the same compiler versionKT-75300
Lenient compiler mode which generates stubs for missing actualsKT-75967
Implement generation of CLI arguments in compiler using new single representationKT-75966
Declare all existing CLI arguments using the new DSLKT-76498
Implement JSON dumper for performance statsKT-75970
Extract all non-trivial logic fromCommonCompilerArguments
and its inheritors
Tools. CLI. Native
KT-69485
Native: remove adding $llvmDir\bin to PATH on Windows
Tools. Compiler Plugins
KT-70982
Deprecate declaration of atomic properties marked with@PublishedApi
with errorKT-76429
Migrate kotlin-dataframe plugin to new IR parameter APIKT-76162
"IllegalStateException: No mapping for symbol: VALUE_PARAMETER INSTANCE_RECEIVER" after updating to 2.1.20KT-75263
PowerAssert: no additional info is displayed for 'when' with subject
Tools. Gradle
New Features
KT-75823
Resources bundle with XCFrameworks for iOS
Fixes
KT-68325
Add to Compiler Types DSL exceptions message possible ways of a solutionKT-74007
Not all the DSL features related to kotlinOptions are deprecatedKT-54110
Change deprecation level to ERROR for kotlinOptions DSLKT-74887
Compatibility with Gradle 8.13 releaseKT-76951
'distribution-base' plugin is only applied in Gradle 8.13KT-77011
Update build regression benchmarks for 2.2.0 releaseKT-73968
KotlinDependencyManagement tries to mutate configuration after it was resolvedKT-73682
Compatibility with Gradle 8.12 releaseKT-74890
Run Gradle integrations test against Gradle 8.13 releaseKT-74889
Compile against Gradle 8.13 APIKT-76282
Add missing Android Gradle plugin versions in testsKT-68597
Update KGP deprecations before 2.2KT-76052
Support Gradle 8.13 for Problems APIKT-73684
Run integration tests against Gradle 8.12KT-76377
Add integration tests for Problems APIKT-76374
Investigate and fix failing tests with configuration cache in KotlinDaemonIT: testDaemonMultiproject and testMultipleCompilationsKT-76379
Gradle: KotlinGradleFinishBuildHandler does not perform cleanup on configuration cache reuseKT-61911
Gradle: make KGP to depend on fixated version of stdlibKT-62963
Remove "kotlin.incremental.useClasspathSnapshot" property
Tools. Gradle. JS
KT-74735
KGP uses Gradle internalCompositeProjectComponentArtifactMetadata
KT-71879
Notice of upcoming deprecation for Boolean 'is-' properties in Gradle Groovy scripts
Tools. Gradle. Multiplatform
KT-66423
Configuration cache false recalculation because of Kotlin Native downloading during the execution phaseKT-74888
Use 'distribution-base' plugin in KMP/JVMKT-76659
Write proper diagnostics for Uklib checksKT-75808
KGP: MPP with jvm target and Gradle java-test-fixtures is brokenKT-71698
Remove preset APIs
Tools. Gradle. Native
KT-74953
Deprecate kotlinArtifacts with a warning
Tools. Incremental Compile
KT-75883
Follow-up: switch from INSTANCE heuristic to outerClass chainKT-76041
Make lenient mode work with IC
Tools. JPS
KT-76495
JPS: delegated Maven builds use embeddable version of kotlin-serialization compiler plugin with non-embeddable Kotlin compilerKT-60914
IC misses dependency to recompile when named kt file with JvmField instructed property was replaced with an object with the same nameKT-75917
Unused imports may lead to inc compilation failureKT-63707
JPS: "Multiple values are not allowed for" caused by Compose
Tools. Kapt
KT-75936
K2 KAPT: unsupported FIR element kinds in constant evaluationKT-76546
Kapt / CLI: ""compile" mode is not supported in Kotlin 2.x" with -version flagKT-75942
K2 KAPT: underscore not allowed hereKT-40485
-Xjvm-default=all causes private interface methods to be generated in JVM target < 9 which is not supported in annotation processing
Tools. Maven
KT-77036
Kotlin Maven plugin: ClassNotFoundException com.google.common.base.Joiner with compiler plugins in debug mode
Tools. REPL
KT-76507
[K2 Repl] Delegated properties are not visible in the next snippetKT-76508
[K2 Repl] Annotations on property accessors are not resolvedKT-75672
[K2 Repl] Serialization plugin crashes compiler backendKT-75632
Contunue deprecation of the REPL built intokotlinc
KT-76009
[K2 Repl] Kotlin-specific imports does not work if dependency is added to the classpath after 1st snippetKT-75580
[K2 Repl] Cannot access snippet properties using Kotlin reflection
Tools. Scripts
KT-76424
Dependencies in main.kts not working with 2.1.20KT-76430
Migrate scripting plugin to new IR parameter API
Tools. Wasm
KT-76657
K/Wasm: Composite build does not work with wasm tasksKT-76656
K/Wasm: Change NPM project name of wasm projectsKT-76587
Wasm lock check failure says to run the JS lock upgradeKT-76161
Wasm: "export startUnitTests was not found" after updating to Kotlin 2.1.20KT-76330
K/Wasm: update binaryen to 123 or newer